|
@ -1,6 +1,8 @@ |
|
|
#!/usr/bin/python |
|
|
#!/usr/bin/python |
|
|
# -*- coding:utf-8 -*- |
|
|
# -*- coding:utf-8 -*- |
|
|
|
|
|
|
|
|
|
|
|
import copy |
|
|
|
|
|
|
|
|
def __originConfig(proxyInfo: dict) -> list: |
|
|
def __originConfig(proxyInfo: dict) -> list: |
|
|
return [ |
|
|
return [ |
|
|
'client', |
|
|
'client', |
|
@ -36,6 +38,12 @@ def load(proxyInfo: dict, socksPort: int, configFile: str) -> tuple[list, str or |
|
|
|
|
|
|
|
|
return startCommand, fileContent, envVar |
|
|
return startCommand, fileContent, envVar |
|
|
""" |
|
|
""" |
|
|
|
|
|
proxyInfo = copy.deepcopy(proxyInfo) |
|
|
|
|
|
if proxyInfo['server'].find(':') >= 0: |
|
|
|
|
|
proxyInfo['server'] = '[' + proxyInfo['server'] + ']' # IPv6 |
|
|
|
|
|
if proxyInfo['ws'] is not None and proxyInfo['ws']['host'].find(':') >= 0: |
|
|
|
|
|
proxyInfo['ws']['host'] = '[' + proxyInfo['ws']['host'] + ']' # IPv6 |
|
|
|
|
|
|
|
|
command = [ |
|
|
command = [ |
|
|
'brook', |
|
|
'brook', |
|
|
'--debug', '--listen', 'skip success', # debug on |
|
|
'--debug', '--listen', 'skip success', # debug on |
|
|