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
b63e58f4
Commit
b63e58f4
authored
May 20, 2020
by
Brian May
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create github workflow
parent
88ce5c0b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
5 deletions
+39
-5
pythonpackage.yml
.github/workflows/pythonpackage.yml
+35
-0
client.py
sshuttle/client.py
+3
-3
server.py
sshuttle/server.py
+1
-1
ssh.py
sshuttle/ssh.py
+0
-1
No files found.
.github/workflows/pythonpackage.yml
0 → 100644
View file @
b63e58f4
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name
:
Python package
on
:
push
:
branches
:
[
master
]
pull_request
:
branches
:
[
master
]
jobs
:
build
:
runs-on
:
ubuntu-latest
strategy
:
matrix
:
python-version
:
[
3.5
,
3.6
,
3.7
,
3.8
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install dependencies
run
:
|
python -m pip install --upgrade pip
pip install -r requirements-tests.txt
-
name
:
Lint with flake8
run
:
|
flake8 sshuttle tests --count --show-source --statistics
-
name
:
Test with pytest
run
:
|
PYTHONPATH=$PWD pytest
sshuttle/client.py
View file @
b63e58f4
...
...
@@ -224,7 +224,7 @@ class FirewallClient:
# No env: Talking to `FirewallClient.start`, which has no i18n.
e
=
None
break
except
OSError
as
e
:
except
OSError
:
pass
self
.
argv
=
argv
s1
.
close
()
...
...
@@ -304,8 +304,8 @@ class FirewallClient:
raise
Fatal
(
'
%
r expected STARTED, got
%
r'
%
(
self
.
argv
,
line
))
def
sethostip
(
self
,
hostname
,
ip
):
assert
(
not
re
.
search
(
b
'[^-
\
w
\
.]'
,
hostname
))
assert
(
not
re
.
search
(
b
'[^0-9.]'
,
ip
))
assert
(
not
re
.
search
(
r
b
'[^-
\
w
\
.]'
,
hostname
))
assert
(
not
re
.
search
(
r
b
'[^0-9.]'
,
ip
))
self
.
pfile
.
write
(
b
'HOST
%
s,
%
s
\n
'
%
(
hostname
,
ip
))
self
.
pfile
.
flush
()
...
...
sshuttle/server.py
View file @
b63e58f4
...
...
@@ -25,7 +25,7 @@ def _ipmatch(ipstr):
# FIXME: IPv4 only
if
ipstr
==
'default'
:
ipstr
=
'0.0.0.0/0'
m
=
re
.
match
(
'^(
\
d+(
\
.
\
d+(
\
.
\
d+(
\
.
\
d+)?)?)?)(?:/(
\
d+))?$'
,
ipstr
)
m
=
re
.
match
(
r
'^(\d+(\.\d+(\.\d+(\.\d+)?)?)?)(?:/(\d+))?$'
,
ipstr
)
if
m
:
g
=
m
.
groups
()
ips
=
g
[
0
]
...
...
sshuttle/ssh.py
View file @
b63e58f4
...
...
@@ -114,7 +114,6 @@ def parse_hostport(rhostport):
host
=
parsed
.
hostname
port
=
parsed
.
port
if
password
is
None
or
len
(
password
)
==
0
:
password
=
None
...
...
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