The client should accept some options on the command line to adjust it's behaviour.
Current thinking is something along the following lines
./LocalChat.py [--auth|--verify] [server]
should always be the final option (and if a valid string - i.e. http/https prefix - not provided, use the built in default).
should enable SSL cert authentication. It's off by default because the server uses Ad-hoc certs (you almost certainly aren't going to want to expose your activities by first going to a publicly trusted CA to get a cert, plus it uses loopback by default, so you aren't going to get one).
It's use case is for when deploying the server as a "hidden" path on an existing website (so for example https://www.example.com/mysecretchat
might be proxied through to the server). In that scenario, you'd already have a trusted cert on the main website, so probably want to verify the cert.
should tell the client that the user wants to add Basic authentication (or maybe digest) headers to every request. Once the client has launched it should prompt the user to enter the credentials (we don't want them on the commandline as they'll appear in ps
The use-case is an extension of that for --verify
. If I "hide" the server under https://www.example.com/mysecretchat
I may want to ignore (or better, 404) any requests that do not include a valid authentication header so that the path cannot so easily be discovered.
This FR is only for adding support for accepting options from the command line. I'll raise separate subtasks for the functionality described above once the support is in place.