Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
re6stnet
Commits
2cf88eef
Commit
2cf88eef
authored
Jul 11, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
6d759c9b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
re6st/plib.py
re6st/plib.py
+1
-2
re6st/registry.py
re6st/registry.py
+0
-1
re6st/utils.py
re6st/utils.py
+3
-2
No files found.
re6st/plib.py
View file @
2cf88eef
...
...
@@ -42,8 +42,7 @@ def server(iface, max_clients, dh_path, pipe_fd, port, proto, encrypt, *args, **
def
client
(
iface
,
address_list
,
encrypt
,
*
args
,
**
kw
):
remote
=
[
'--nobind'
,
'--client'
]
for
ip
,
port
,
proto
in
address_list
:
remote
+=
'--remote'
,
ip
,
port
,
\
proto
+
'-client'
if
proto
in
(
'tcp'
,
'tcp6'
)
else
proto
remote
+=
'--remote'
,
ip
,
port
,
proto
remote
+=
args
return
openvpn
(
iface
,
encrypt
,
*
remote
,
**
kw
)
...
...
re6st/registry.py
View file @
2cf88eef
...
...
@@ -281,7 +281,6 @@ class RegistryServer(object):
peers
=
deque
((
'%u/%u'
%
(
int
(
self
.
prefix
,
2
),
len
(
self
.
prefix
)),))
cookie
=
hex
(
random
.
randint
(
0
,
1
<<
32
))[
2
:]
graph
=
dict
.
fromkeys
(
peers
)
asked
=
0
while
True
:
r
,
w
,
_
=
select
.
select
([
self
.
sock
],
[
self
.
sock
]
if
peers
else
[],
[],
1
)
...
...
re6st/utils.py
View file @
2cf88eef
...
...
@@ -200,8 +200,9 @@ def dump_address(address):
def
parse_address
(
address_list
):
for
address
in
address_list
.
split
(
';'
):
try
:
ip
,
port
,
proto
=
address
.
split
(
','
)
yield
ip
,
str
(
port
),
proto
a
=
ip
,
port
,
proto
=
address
.
split
(
','
)
int
(
port
)
yield
a
except
ValueError
,
e
:
logging
.
warning
(
"Failed to parse node address %r (%s)"
,
address
,
e
)
...
...
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