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
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
Joanne Hugé
re6stnet
Commits
03e3061a
Commit
03e3061a
authored
Jul 23, 2012
by
Guillaume Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed ip length problem in openvpn server
parent
b9f25552
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
TODO
TODO
+3
-4
plib.py
plib.py
+2
-2
vifibnet.py
vifibnet.py
+1
-1
No files found.
TODO
View file @
03e3061a
...
...
@@ -15,10 +15,6 @@ To be done :
Use an algorithm to choose which connections to keep and/or establish
instead of pure randomness
Find a name for the project : the projet is ( or should be ) independant
from vifib, openvpn, babel, and so should the name; btw we aim to build a
distributed, scalable, resilient VPN.... ( if it helps with the name )
Replace comments at the beginning of functions with docstrings & give all
fn docstrings
...
...
@@ -34,6 +30,9 @@ To be done :
( avahi could be used )
To be discussed:
Ideas for the name :
CON ( cloud overlay network ), cloudnet. From J.P -> already taken
G, J : To get traffic stats ( bytes in/out ), you can use
/sys/class/net/interface/statistics/rx_bytes, etc...
or /proc/net/dev/snmp6/interface ( all in one file ). This can be enough
...
...
plib.py
View file @
03e3061a
...
...
@@ -17,12 +17,12 @@ def openvpn(hello_interval, *args, **kw):
utils
.
log
(
str
(
args
),
5
)
return
subprocess
.
Popen
(
args
,
**
kw
)
def
server
(
server_ip
,
network
,
max_clients
,
dh_path
,
pipe_fd
,
port
,
proto
,
hello_interval
,
*
args
,
**
kw
):
def
server
(
server_ip
,
ip_length
,
max_clients
,
dh_path
,
pipe_fd
,
port
,
proto
,
hello_interval
,
*
args
,
**
kw
):
utils
.
log
(
'Starting server'
,
3
)
return
openvpn
(
hello_interval
,
'--tls-server'
,
'--mode'
,
'server'
,
'--up'
,
'ovpn-server %s/%u'
%
(
server_ip
,
len
(
network
)
),
'--up'
,
'ovpn-server %s/%u'
%
(
server_ip
,
ip_length
),
'--client-connect'
,
'ovpn-server '
+
str
(
pipe_fd
),
'--client-disconnect'
,
'ovpn-server '
+
str
(
pipe_fd
),
'--dh'
,
dh_path
,
...
...
vifibnet.py
View file @
03e3061a
...
...
@@ -122,7 +122,7 @@ def main():
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_TRUNC
),
stderr
=
subprocess
.
STDOUT
)
# Establish connections
server_process
=
list
(
plib
.
server
(
internal_ip
,
network
,
server_process
=
list
(
plib
.
server
(
internal_ip
,
len
(
network
)
+
len
(
prefix
)
,
config
.
connection_count
,
config
.
dh
,
write_pipe
,
config
.
internal_port
,
proto
,
config
.
hello
,
'--dev'
,
'vifibnet'
,
*
openvpn_args
,
stdout
=
os
.
open
(
os
.
path
.
join
(
config
.
log
,
...
...
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