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
27a5abf6
Commit
27a5abf6
authored
Jul 25, 2012
by
Guillaume Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some comments
parent
8d0aabf2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
TODO
TODO
+2
-0
registry.py
registry.py
+1
-1
tunnel.py
tunnel.py
+5
-1
vifibnet.py
vifibnet.py
+1
-1
No files found.
TODO
View file @
27a5abf6
...
@@ -15,6 +15,8 @@ To be done :
...
@@ -15,6 +15,8 @@ To be done :
Write docstrings for all class/methods/functions
Write docstrings for all class/methods/functions
Handle corrupt peers DB gracefully
To be discussed:
To be discussed:
U : Babel seems to be very long to establish the routes : maybe we should
U : Babel seems to be very long to establish the routes : maybe we should
...
...
registry.py
View file @
27a5abf6
...
@@ -188,7 +188,7 @@ class main(object):
...
@@ -188,7 +188,7 @@ class main(object):
else
:
else
:
prefix
,
address
=
self
.
db
.
execute
(
"""SELECT prefix, address
prefix
,
address
=
self
.
db
.
execute
(
"""SELECT prefix, address
FROM peers ORDER BY random() LIMIT 1"""
)
FROM peers ORDER BY random() LIMIT 1"""
)
print
"Sending bootstrap peer (%s, %s)"
%
(
prefix
,
str
(
address
)
)
print
"Sending bootstrap peer (%s, %s)"
%
(
prefix
,
address
)
return
prefix
,
address
return
prefix
,
address
def
declare
(
self
,
handler
,
address
):
def
declare
(
self
,
handler
,
address
):
...
...
tunnel.py
View file @
27a5abf6
...
@@ -32,9 +32,13 @@ class Connection:
...
@@ -32,9 +32,13 @@ class Connection:
%
(
self
.
_prefix
,
self
.
process
.
returncode
),
3
)
%
(
self
.
_prefix
,
self
.
process
.
returncode
),
3
)
return
False
return
False
self
.
_updateBandwidth
()
#
self._updateBandwidth()
return
True
return
True
# Unused for now. By killing tunnels with significantly lower trafic
# in comparison to other tunnels, we hope to connect to nodes with
# better bandwith, in order to improve connectivity with destinations
# we are really interested in.
def
_updateBandwidth
(
self
):
def
_updateBandwidth
(
self
):
try
:
try
:
f_rx
=
open
(
'/sys/class/net/%s/statistics/rx_bytes'
%
f_rx
=
open
(
'/sys/class/net/%s/statistics/rx_bytes'
%
...
...
vifibnet.py
View file @
27a5abf6
...
@@ -137,7 +137,7 @@ def main():
...
@@ -137,7 +137,7 @@ def main():
# Establish connections
# Establish connections
server_process
=
list
(
plib
.
server
(
internal_ip
,
len
(
network
)
+
len
(
prefix
),
server_process
=
list
(
plib
.
server
(
internal_ip
,
len
(
network
)
+
len
(
prefix
),
config
.
connection_count
,
config
.
dh
,
write_pipe
,
port
,
config
.
connection_count
,
config
.
dh
,
write_pipe
,
port
,
proto
,
config
.
hello
,
'--dev'
,
'vifibnet
'
,
*
openvpn_args
,
proto
,
config
.
hello
,
'--dev'
,
'vifibnet
-%s'
%
proto
,
*
openvpn_args
,
stdout
=
os
.
open
(
os
.
path
.
join
(
config
.
log
,
stdout
=
os
.
open
(
os
.
path
.
join
(
config
.
log
,
'vifibnet.server.%s.log'
%
(
proto
,)),
'vifibnet.server.%s.log'
%
(
proto
,)),
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_TRUNC
),
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_TRUNC
),
...
...
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