near-api-py
near-api-py copied to clipboard
JsonProvider should be able to accept proxy arguments
class JsonProvider(object): def init(self, rpc_addr,proxies=None): ... self.proxies=proxies ... def json_rpc(self, method, params, timeout=2): ... r = requests.post(self.rpc_addr(), json=j, timeout=timeout,proxies=self.proxies) ...
example:
proxies=
{'http':'socks5://localhost:1080','https':'socks5://localhost:1080'}
provider=JsonProvider(node_url,proxies)