Commit graph

5 commits

Author SHA1 Message Date
Jonathan Hodgson
bb62ed3b1f Starts work on https as well as some moving about
I now start the listener in the main.c file rather than proxy given that
I didn't feel proxy was the right place if a normal (non-proxied)
request came in. webserver.{c,h} and proxy.{c,h} had some changes
relating to this.

The config changed slightly - we now create a folder in ~/.config/
called yaip. This is where certificates and so on will be stored along
with the user configuration

I created a helper function to get files inside this directory (it
changes based on xdg_config_home) and updated relevant tests.

In ssl.{c,h} I have started work. If they don't exist, the tool now
creates and stores a key and certificate for the CA that this tool will
need to pretend to be. I still need to write tests for this.
2022-01-20 16:53:35 +00:00
Jonathan Hodgson
8a5bfe9b36 Now working for simple, non-encrypted requests
making requests to something like example.com over a non-encrypted
connection now works. Binary files are unlikely to work at the moment
although I haven't tried. Also, non-encrypted doesn't work.

I have also changed a little about how tests work. Requests tests now
display much better.
2022-01-18 21:45:58 +00:00
Jonathan Hodgson
62ab5ea68d adds -g flag to gcc 2022-01-10 09:39:01 +00:00
Jonathan Hodgson
e42705280c Add tests for config
I have started writing tests for the config functions. This has resulted
in a few changes to the config code (tests working I guess)

I have also added a special "all" config file which (as the name
suggests) runs all test suites

In the makefile I have added the compiled test files to the clean target
and added targets for building and running tests
2021-12-28 00:28:56 +00:00
Jonathan Hodgson
f48a110429 I have made a start
I have done some work on opening a socket and waiting for a connection.
This can be read line by line and I have started a request struct that
it will accept.

Also started on some docs. Not much is yet working. I am going to start
learning µnit for unit tests:

https://nemequ.github.io/munit/
2021-12-27 21:43:11 +00:00