mmgen-{swaptxcreate,swaptxdo,txsend}: support --proxy=env param
Allow use of the *_PROXY environment vars when connecting to the THORNode and Etherscan HTTPS servers
This commit is contained in:
parent
9b8c542670
commit
5dd358a851
6 changed files with 16 additions and 6 deletions
|
|
@ -1 +1 @@
|
|||
15.1.dev35
|
||||
15.1.dev36
|
||||
|
|
|
|||
|
|
@ -80,7 +80,9 @@ opts_data = {
|
|||
-s -S, --list-assets List available swap assets
|
||||
-- -v, --verbose Produce more verbose output
|
||||
b- -V, --vsize-adj= f Adjust transaction's estimated vsize by factor 'f'
|
||||
-s -x, --proxy=P Fetch the swap quote via SOCKS5 proxy ‘P’ (host:port)
|
||||
-s -x, --proxy=P Fetch the swap quote via SOCKS5 proxy ‘P’ (host:port).
|
||||
+ Use special value ‘env’ to honor *_PROXY environment
|
||||
+ vars instead.
|
||||
-- -y, --yes Answer 'yes' to prompts, suppress non-essential output
|
||||
e- -X, --cached-balances Use cached balances
|
||||
""",
|
||||
|
|
|
|||
|
|
@ -106,7 +106,9 @@ opts_data = {
|
|||
-- -v, --verbose Produce more verbose output
|
||||
b- -V, --vsize-adj= f Adjust transaction's estimated vsize by factor 'f'
|
||||
e- -w, --wait Wait for transaction confirmation
|
||||
-s -x, --proxy=P Fetch the swap quote via SOCKS5 proxy ‘P’ (host:port)
|
||||
-s -x, --proxy=P Fetch the swap quote via SOCKS5 proxy ‘P’ (host:port).
|
||||
+ Use special value ‘env’ to honor *_PROXY environment
|
||||
+ vars instead.
|
||||
e- -X, --cached-balances Use cached balances
|
||||
-- -y, --yes Answer 'yes' to prompts, suppress non-essential output
|
||||
-- -z, --show-hash-presets Show information on available hash presets
|
||||
|
|
|
|||
|
|
@ -61,7 +61,9 @@ opts_data = {
|
|||
begins with one.
|
||||
-v, --verbose Be more verbose
|
||||
-w, --wait Wait for transaction confirmation (Ethereum only)
|
||||
-x, --proxy=P Connect to TX proxy via SOCKS5 proxy ‘P’ (host:port)
|
||||
-x, --proxy=P Connect to TX proxy via SOCKS5h proxy ‘P’ (host:port).
|
||||
Use special value ‘env’ to honor *_PROXY environment vars
|
||||
instead.
|
||||
-y, --yes Answer 'yes' to prompts, suppress non-essential output
|
||||
"""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ class ThornodeRPCClient:
|
|||
self.session = requests.Session()
|
||||
self.session.trust_env = False # ignore *_PROXY environment vars
|
||||
self.session.headers = self.http_hdrs
|
||||
if self.cfg.proxy:
|
||||
if self.cfg.proxy == 'env':
|
||||
self.session.trust_env = True
|
||||
elif self.cfg.proxy:
|
||||
self.session.proxies.update({
|
||||
'http': f'socks5h://{self.cfg.proxy}',
|
||||
'https': f'socks5h://{self.cfg.proxy}'
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ class TxProxyClient:
|
|||
self.session = requests.Session()
|
||||
self.session.trust_env = False # ignore *_PROXY environment vars
|
||||
self.session.headers = self.http_hdrs
|
||||
if self.cfg.proxy:
|
||||
if self.cfg.proxy == 'env':
|
||||
self.session.trust_env = True
|
||||
elif self.cfg.proxy:
|
||||
self.session.proxies.update({
|
||||
'http': f'socks5h://{self.cfg.proxy}',
|
||||
'https': f'socks5h://{self.cfg.proxy}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue