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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
re6stnet
Commits
938da7ea
Commit
938da7ea
authored
Jul 25, 2012
by
Guillaume Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bootstrap peer fixed in registry
parent
c899b4ec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
3 deletions
+12
-3
README
README
+1
-1
TODO
TODO
+4
-0
registry.py
registry.py
+5
-1
tunnel.py
tunnel.py
+1
-0
vifibnet.py
vifibnet.py
+1
-1
No files found.
README
View file @
938da7ea
...
@@ -154,7 +154,7 @@ OPTIONS : VIFIBNET.PY
...
@@ -154,7 +154,7 @@ OPTIONS : VIFIBNET.PY
line, vifibnet will attempt to forward a port with upnp for each
line, vifibnet will attempt to forward a port with upnp for each
couple port/proto given.
couple port/proto given.
Protocols should be either udp or tcp-server.
Protocols should be either udp or tcp-server.
Default : (1194, udp)
Default : (1194, udp)
, (1194, tcp-server)
--tunnel-refresh duration
--tunnel-refresh duration
Interval in seconds between two tunnel refresh. Refreshing tunnels
Interval in seconds between two tunnel refresh. Refreshing tunnels
...
...
TODO
View file @
938da7ea
Name ideas :
resnet ( for Resiliable NET )
rsnet ( Resiliable Scalable NET )
To be done :
To be done :
use the server as a bootstrap node -> switch peer discovery to be done
use the server as a bootstrap node -> switch peer discovery to be done
by vifibnet directly ?
by vifibnet directly ?
...
...
registry.py
View file @
938da7ea
...
@@ -53,6 +53,9 @@ class main(object):
...
@@ -53,6 +53,9 @@ class main(object):
help
=
'Path to certificate key'
)
help
=
'Path to certificate key'
)
_
(
'--mailhost'
,
required
=
True
,
_
(
'--mailhost'
,
required
=
True
,
help
=
'SMTP server mail host'
)
help
=
'SMTP server mail host'
)
_
(
'--bootstrap'
,
required
=
True
,
nargs
=
4
,
help
=
'''VPN prefix, ip address, port and protocol to send as
bootstrap peer'''
)
self
.
config
=
parser
.
parse_args
()
self
.
config
=
parser
.
parse_args
()
# Database initializing
# Database initializing
...
@@ -178,7 +181,8 @@ class main(object):
...
@@ -178,7 +181,8 @@ class main(object):
# TODO: Insert a flag column for bootstrap ready servers in peers
# TODO: Insert a flag column for bootstrap ready servers in peers
# ( servers which shouldn't go down or change ip and port as opposed to servers owned by particulars )
# ( servers which shouldn't go down or change ip and port as opposed to servers owned by particulars )
# that way, we also ascertain that the server sent is not the new node....
# that way, we also ascertain that the server sent is not the new node....
prefix
,
address
=
self
.
db
.
execute
(
"SELECT prefix, address FROM peers ORDER BY random() LIMIT 1"
).
next
()
prefix
=
self
.
config
.
bootstrap
[
0
]
address
=
','
.
join
(
self
.
config
.
bootstrap
[
1
:])
print
"Sending bootstrap peer (%s, %s)"
%
(
prefix
,
str
(
address
))
print
"Sending bootstrap peer (%s, %s)"
%
(
prefix
,
str
(
address
))
return
prefix
,
address
return
prefix
,
address
...
...
tunnel.py
View file @
938da7ea
...
@@ -174,3 +174,4 @@ class TunnelManager:
...
@@ -174,3 +174,4 @@ class TunnelManager:
utils
.
log
(
'Routes on iface %s : %s'
%
(
utils
.
log
(
'Routes on iface %s : %s'
%
(
self
.
_connection_dict
[
p
].
iface
,
self
.
_connection_dict
[
p
].
iface
,
self
.
_connection_dict
[
p
].
routes
),
5
)
self
.
_connection_dict
[
p
].
routes
),
5
)
vifibnet.py
View file @
938da7ea
...
@@ -85,7 +85,7 @@ def main():
...
@@ -85,7 +85,7 @@ def main():
# Get arguments
# Get arguments
config
=
getConfig
()
config
=
getConfig
()
if
not
config
.
pp
:
if
not
config
.
pp
:
config
.
pp
=
[[
'1194'
,
'udp'
]]
config
.
pp
=
[[
'1194'
,
'udp'
]
,
[
'1194'
,
'tcp-server'
]
]
manual
=
bool
(
config
.
address
)
manual
=
bool
(
config
.
address
)
network
=
utils
.
networkFromCa
(
config
.
ca
)
network
=
utils
.
networkFromCa
(
config
.
ca
)
internal_ip
,
prefix
=
utils
.
ipFromCert
(
network
,
config
.
cert
)
internal_ip
,
prefix
=
utils
.
ipFromCert
(
network
,
config
.
cert
)
...
...
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