mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
a tor-control patch to do setconf too
svn:r2725
This commit is contained in:
parent
ef6bdd6c1e
commit
911538725a
@ -52,12 +52,18 @@ def get_option(s,name):
|
||||
length,type,body = receive_message(s)
|
||||
return
|
||||
|
||||
def set_option(s,msg):
|
||||
s.sendall(pack_message(MSG_TYPE_SETCONF,msg))
|
||||
length,type,body = receive_message(s)
|
||||
return
|
||||
|
||||
def do_main_loop(host,port):
|
||||
print "host is %s:%d"%(host,port)
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((host,port))
|
||||
authenticate(s)
|
||||
get_option(s,"nickname")
|
||||
set_option(s,"runasdaemon 1")
|
||||
# get_option(s,"DirFetchPostPeriod\n")
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user