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
afa2bde3
Commit
afa2bde3
authored
Jul 06, 2012
by
Ulysse Beaugnon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace --max-peer with --max-clients
parent
209ce7c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
main.py
main.py
+0
-3
openvpn.py
openvpn.py
+1
-1
No files found.
main.py
View file @
afa2bde3
...
@@ -7,7 +7,6 @@ import random
...
@@ -7,7 +7,6 @@ import random
VIFIB_NET
=
"2001:db8:42::/48"
VIFIB_NET
=
"2001:db8:42::/48"
connection_dict
=
{}
# to remember current connections we made
connection_dict
=
{}
# to remember current connections we made
client_set
=
set
([])
# to remember current connections other made
free_interface_set
=
set
((
'client1'
,
'client2'
,
'client3'
,
'client4'
,
'client5'
,
free_interface_set
=
set
((
'client1'
,
'client2'
,
'client3'
,
'client4'
,
'client5'
,
'client6'
,
'client7'
,
'client8'
,
'client9'
,
'client10'
))
'client6'
,
'client7'
,
'client8'
,
'client9'
,
'client10'
))
...
@@ -155,11 +154,9 @@ def handle_message(msg):
...
@@ -155,11 +154,9 @@ def handle_message(msg):
words
=
msg
.
split
()
words
=
msg
.
split
()
if
words
[
0
]
==
'CLIENT_CONNECTED'
:
if
words
[
0
]
==
'CLIENT_CONNECTED'
:
log_message
(
'Incomming connection from '
+
words
[
1
],
3
)
log_message
(
'Incomming connection from '
+
words
[
1
],
3
)
client_set
.
push
(
words
[
1
])
# TODO : check if we are not already connected to it
# TODO : check if we are not already connected to it
elif
words
[
0
]
==
'CLIENT_DISCONNECTED'
:
elif
words
[
0
]
==
'CLIENT_DISCONNECTED'
:
log_message
(
words
[
1
]
+
' has disconnected'
,
3
)
log_message
(
words
[
1
]
+
' has disconnected'
,
3
)
client_set
.
pop
(
words
[
1
])
else
:
else
:
log_message
(
'Unknow message recieved from the openvpn pipe : '
+
msg
,
1
)
log_message
(
'Unknow message recieved from the openvpn pipe : '
+
msg
,
1
)
...
...
openvpn.py
View file @
afa2bde3
...
@@ -33,7 +33,7 @@ def server(ip, pipe_fd, *args, **kw):
...
@@ -33,7 +33,7 @@ def server(ip, pipe_fd, *args, **kw):
'--client-connect'
,
'client-connect '
+
str
(
pipe_fd
),
'--client-connect'
,
'client-connect '
+
str
(
pipe_fd
),
'--client-disconnect'
,
'client-disconnect '
+
str
(
pipe_fd
),
'--client-disconnect'
,
'client-disconnect '
+
str
(
pipe_fd
),
'--dh'
,
config
.
dh
,
'--dh'
,
config
.
dh
,
'--max-clients'
,
config
.
max_
peer
,
'--max-clients'
,
config
.
max_
clients
,
*
args
,
**
kw
)
*
args
,
**
kw
)
def
client
(
serverIp
,
*
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