Skip to content

Commit 179bb10

Browse files
vieirabrianmay
authored andcommitted
Load options from a file
This small change will allow a file path to be passed as argument from which the command line options will be loaded. Extra command line options can be passed (in addition to those already in the file) and existing ones can be overriden. Example sshuttle.conf file: 192.168.0.0/16 --remote [email protected] Example sshuttle call: sshuttle @/path/to/sshuttle.conf Example sshuttle call with verbose flags added: sshuttle @/path/to/sshuttle.conf -vvv Example sshuttle call overriding the remote server: sshuttle @/path/to/sshuttle.conf -r [email protected]
1 parent 9a176aa commit 179bb10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sshuttle/options.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ def __call__(self, parser, namespace, values, option_string=None):
9898

9999
parser = ArgumentParser(
100100
prog="sshuttle",
101-
usage="%(prog)s [-l [ip:]port] [-r [user@]sshserver[:port]] <subnets...>"
101+
usage="%(prog)s [-l [ip:]port] [-r [user@]sshserver[:port]] <subnets...>",
102+
fromfile_prefix_chars="@"
102103
)
103104
parser.add_argument(
104105
"subnets",

0 commit comments

Comments
 (0)