settings_services.py 633 B

1234567891011121314151617
  1. import base64
  2. import urllib.request
  3. def unpause_namecoin():
  4. request = urllib.request.Request("http://127.0.0.1:8336/", data=b'{"id":"stemns","method":"unpausenetwork","params":[]}')
  5. auth = b"user:password"
  6. authb64 = base64.b64encode(auth).decode("utf-8")
  7. request.add_header("Authorization", f"Basic {authb64}")
  8. urllib.request.urlopen(request)
  9. _service_to_command = {
  10. "bit.onion": ['TorBrowser/ncprop279/ncprop279', '--conf=TorBrowser/Data/ncprop279/ncprop279.conf'],
  11. "bit": ['TorBrowser/ncprop279/ncprop279', '--conf=TorBrowser/Data/ncprop279/ncprop279.conf'],
  12. }
  13. _bootstrap_callback = unpause_namecoin