Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sshuttle
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pub
sshuttle
Commits
61f9ae6f
Commit
61f9ae6f
authored
Nov 30, 2015
by
Felix Yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug reported by @matiwinnetou in #31
parent
698351cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
client.py
sshuttle/client.py
+4
-4
No files found.
sshuttle/client.py
View file @
61f9ae6f
...
@@ -259,8 +259,8 @@ class FirewallClient:
...
@@ -259,8 +259,8 @@ class FirewallClient:
raise
Fatal
(
'
%
r expected STARTED, got
%
r'
%
(
self
.
argv
,
line
))
raise
Fatal
(
'
%
r expected STARTED, got
%
r'
%
(
self
.
argv
,
line
))
def
sethostip
(
self
,
hostname
,
ip
):
def
sethostip
(
self
,
hostname
,
ip
):
assert
(
not
re
.
search
(
r
'[^-\w]'
,
hostname
))
assert
(
not
re
.
search
(
b
'[^-
\
w]'
,
hostname
))
assert
(
not
re
.
search
(
r
'[^0-9.]'
,
ip
))
assert
(
not
re
.
search
(
b
'[^0-9.]'
,
ip
))
self
.
pfile
.
write
(
b
'HOST
%
s,
%
s
\n
'
%
(
hostname
,
ip
))
self
.
pfile
.
write
(
b
'HOST
%
s,
%
s
\n
'
%
(
hostname
,
ip
))
self
.
pfile
.
flush
()
self
.
pfile
.
flush
()
...
@@ -460,7 +460,7 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
...
@@ -460,7 +460,7 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
debug2
(
'got host list:
%
r
\n
'
%
hostlist
)
debug2
(
'got host list:
%
r
\n
'
%
hostlist
)
for
line
in
hostlist
.
strip
()
.
split
():
for
line
in
hostlist
.
strip
()
.
split
():
if
line
:
if
line
:
name
,
ip
=
line
.
split
(
','
,
1
)
name
,
ip
=
line
.
split
(
b
','
,
1
)
fw
.
sethostip
(
name
,
ip
)
fw
.
sethostip
(
name
,
ip
)
mux
.
got_host_list
=
onhostlist
mux
.
got_host_list
=
onhostlist
...
@@ -474,7 +474,7 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
...
@@ -474,7 +474,7 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
if
seed_hosts
is
not
None
:
if
seed_hosts
is
not
None
:
debug1
(
'seed_hosts:
%
r
\n
'
%
seed_hosts
)
debug1
(
'seed_hosts:
%
r
\n
'
%
seed_hosts
)
mux
.
send
(
0
,
ssnet
.
CMD_HOST_REQ
,
'
\n
'
.
join
(
seed_hosts
))
mux
.
send
(
0
,
ssnet
.
CMD_HOST_REQ
,
b
'
\n
'
.
join
(
seed_hosts
))
while
1
:
while
1
:
rv
=
serverproc
.
poll
()
rv
=
serverproc
.
poll
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment