mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-07 22:21:13 +01:00
move sdnotify after setting up firewall rules
This commit is contained in:
parent
be90cc8abd
commit
6b48301b86
@ -8,7 +8,6 @@ import os
|
|||||||
import sshuttle.ssnet as ssnet
|
import sshuttle.ssnet as ssnet
|
||||||
import sshuttle.ssh as ssh
|
import sshuttle.ssh as ssh
|
||||||
import sshuttle.ssyslog as ssyslog
|
import sshuttle.ssyslog as ssyslog
|
||||||
import sshuttle.sdnotify as sdnotify
|
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
from sshuttle.ssnet import SockWrapper, Handler, Proxy, Mux, MuxWrapper
|
from sshuttle.ssnet import SockWrapper, Handler, Proxy, Mux, MuxWrapper
|
||||||
@ -533,9 +532,6 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
|
|||||||
debug1('seed_hosts: %r\n' % seed_hosts)
|
debug1('seed_hosts: %r\n' % seed_hosts)
|
||||||
mux.send(0, ssnet.CMD_HOST_REQ, str.encode('\n'.join(seed_hosts)))
|
mux.send(0, ssnet.CMD_HOST_REQ, str.encode('\n'.join(seed_hosts)))
|
||||||
|
|
||||||
sdnotify.send(sdnotify.ready(),
|
|
||||||
sdnotify.status('Connected to %s.' % remotename))
|
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
rv = serverproc.poll()
|
rv = serverproc.poll()
|
||||||
if rv:
|
if rv:
|
||||||
|
@ -7,6 +7,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import traceback
|
import traceback
|
||||||
|
import sshuttle.sdnotify as sdnotify
|
||||||
from sshuttle.helpers import debug1, debug2, Fatal
|
from sshuttle.helpers import debug1, debug2, Fatal
|
||||||
from sshuttle.methods import get_auto_method, get_method
|
from sshuttle.methods import get_auto_method, get_method
|
||||||
|
|
||||||
@ -219,6 +220,8 @@ def main(method_name, syslog):
|
|||||||
user)
|
user)
|
||||||
|
|
||||||
stdout.write('STARTED\n')
|
stdout.write('STARTED\n')
|
||||||
|
sdnotify.send(sdnotify.ready(),
|
||||||
|
sdnotify.status('Connected'))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
stdout.flush()
|
stdout.flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user