microsocks icon indicating copy to clipboard operation
microsocks copied to clipboard

add the ability to specify whitelisted ips on the command line

Open gallantron opened this issue 1 year ago • 1 comments

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.

gallantron avatar May 21 '24 16:05 gallantron

It might be more intuitive to have -a behave as an additional requirement if -1 is not specified, e.g.:

  • If -a is specified without -u/-P, only the listed IP addresses can connect (without authentication).
  • If -a is specified alongside -u/-P, but without -1, only the listed IP addresses can connect (with authentication).
  • If -a is 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.

gallantron avatar May 21 '24 16:05 gallantron

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.

rofl0r avatar May 24 '24 21:05 rofl0r