Skip to content

Commit ce5fd8b

Browse files
committed
implement all cli interface.
1 parent 9e9a92a commit ce5fd8b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

browsermobproxy/server.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,21 @@ def __init__(self, path='browsermob-proxy', options=None):
8181
"in path provided: %s" % path)
8282

8383
self.path = path
84-
self.host = 'localhost'
84+
self.host = options.get('address', '0.0.0.0')
8585
self.port = options.get('port', 8080)
86+
ttl = options.get('ttl', 0)
87+
use_littleproxy = options.get('use-littleproxy', True)
8688
self.process = None
8789

8890
if platform.system() == 'Darwin':
8991
self.command = ['sh']
9092
else:
9193
self.command = []
92-
self.command += [path, '--port=%s' % self.port]
94+
self.command += [path,
95+
'--address=%s' % self.host,
96+
'--port=%s' % self.port,
97+
'--ttl=%s' % ttl,
98+
'--use-littleproxy=%s' % use_littleproxy]
9399

94100
def start(self, options=None):
95101
"""

0 commit comments

Comments
 (0)