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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
re6stnet
Commits
70b89bd4
Commit
70b89bd4
authored
Jul 06, 2012
by
Guillaume Bury
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.erp5.org/repos/vifibnet
Conflicts: main.py
parents
bb5ddbd1
afa2bde3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
main.py
main.py
+3
-2
openvpn.py
openvpn.py
+1
-0
No files found.
main.py
View file @
70b89bd4
...
...
@@ -6,7 +6,7 @@ import openvpn
import
random
VIFIB_NET
=
"2001:db8:42::/48"
connection_dict
=
{}
# to remember current connections
connection_dict
=
{}
# to remember current connections
we made
free_interface_set
=
set
((
'client1'
,
'client2'
,
'client3'
,
'client4'
,
'client5'
,
'client6'
,
'client7'
,
'client8'
,
'client9'
,
'client10'
))
...
...
@@ -16,6 +16,7 @@ def log_message(message, verbose_level):
# TODO : How do we get our vifib ip ?
# TODO : flag in some way the peers that are connected to us so we don't connect to them
# Or maybe we just don't care,
class
PeersDB
:
def
__init__
(
self
,
dbPath
):
log_message
(
'Connectiong to peers database'
,
4
)
...
...
@@ -72,7 +73,7 @@ def getConfig():
_
(
'--client-count'
,
default
=
2
,
type
=
int
,
help
=
'Number of client connections'
)
# TODO : use maxpeer
_
(
'--max-
peer
'
,
default
=
10
,
type
=
int
,
_
(
'--max-
clients
'
,
default
=
10
,
type
=
int
,
help
=
'the number of peers that can connect to the server'
)
_
(
'--refresh-time'
,
default
=
60
,
type
=
int
,
help
=
'the time (seconds) to wait before changing the connections'
)
...
...
openvpn.py
View file @
70b89bd4
...
...
@@ -33,6 +33,7 @@ def server(ip, pipe_fd, *args, **kw):
'--client-connect'
,
'client-connect '
+
str
(
pipe_fd
),
'--client-disconnect'
,
'client-connect '
+
str
(
pipe_fd
),
'--dh'
,
config
.
dh
,
'--max-clients'
,
config
.
max_clients
,
*
args
,
**
kw
)
def
client
(
serverIp
,
*
args
,
**
kw
):
...
...
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