add the ability to specify whitelisted ips on the command line
This PR extends the auth-once whitelist, allowing initial entries to be specified in the command line using -a ip_addr.
If -u/-P are not specified, this means that only the listed IP addresses can connect.
If -u/-P are specified, the listed IP addresses can connect without authentication, and any other IP address can connect with authentication.
It might be more intuitive to have -a behave as an additional requirement if -1 is not specified, e.g.:
- If
-ais specified without-u/-P, only the listed IP addresses can connect (without authentication). - If
-ais specified alongside-u/-P, but without-1, only the listed IP addresses can connect (with authentication). - If
-ais specified alongside-u/-P, but with-1, the listed IP addresses can connect (without authentication) and any others can connect with authentication (being added to the list).
This PR does not implement the functionality listed in this comment; it is merely a thought experiment.
sorry to close your PR in this manner, but since this is basically a duplicate of #46 but with more complex rules, i went ahead and did what i wanted to do since i first saw the other PR: implement it myself. in order to use microsocks in "whitelist-only" mode, just provide a long and complex user/password combo.