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
Xiaowu Zhang
re6stnet
Commits
410f51c4
Commit
410f51c4
authored
Jul 17, 2012
by
Guillaume Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed openvpn scripts
parent
164cbdd4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
30 deletions
+25
-30
openvpn-client-connect
openvpn-client-connect
+0
-0
openvpn-route-up
openvpn-route-up
+0
-0
openvpn-up-client
openvpn-up-client
+0
-0
openvpn-up-server
openvpn-up-server
+0
-0
openvpn.py
openvpn.py
+22
-0
vifibnet.py
vifibnet.py
+3
-30
No files found.
client-connect
→
openvpn-
client-connect
View file @
410f51c4
File moved
route-up
→
openvpn-
route-up
View file @
410f51c4
File moved
up-client
→
openvpn-
up-client
View file @
410f51c4
File moved
up-server
→
openvpn-
up-server
View file @
410f51c4
File moved
openvpn.py
View file @
410f51c4
...
...
@@ -44,4 +44,26 @@ def client(serverIp, pipe_fd, *args, **kw):
'--up'
,
'up-client'
,
'--route-up'
,
'route-up '
+
str
(
pipe_fd
),
*
args
,
**
kw
)
def
startBabel
(
**
kw
):
args
=
[
'babeld'
,
'-C'
,
'redistribute local ip %s'
%
(
utils
.
config
.
internal_ip
),
'-C'
,
'redistribute local deny'
,
# Route VIFIB ip adresses
'-C'
,
'in ip %s::/%u'
%
(
utils
.
ipFromBin
(
utils
.
config
.
vifibnet
),
len
(
utils
.
config
.
vifibnet
)),
# Route only addresse in the 'local' network,
# or other entire networks
#'-C', 'in ip %s' % (config.internal_ip),
#'-C', 'in ip ::/0 le %s' % network_mask,
# Don't route other addresses
'-C'
,
'in deny'
,
'-d'
,
str
(
utils
.
config
.
verbose
),
'-s'
,
]
if
utils
.
config
.
babel_state
:
args
+=
'-S'
,
utils
.
config
.
babel_state
args
=
args
+
[
'vifibnet'
]
+
list
(
tunnelmanager
.
free_interface_set
)
if
utils
.
config
.
verbose
>=
5
:
print
args
return
subprocess
.
Popen
(
args
,
**
kw
)
vifibnet.py
View file @
410f51c4
#!/usr/bin/env python
import
argparse
,
errno
,
math
,
os
,
select
,
subprocess
,
sys
,
time
import
argparse
,
errno
,
math
,
os
,
select
,
subprocess
,
sys
,
time
,
traceback
from
OpenSSL
import
crypto
import
traceback
import
upnpigd
import
openvpn
import
utils
import
db
import
tunnelmanager
def
startBabel
(
**
kw
):
args
=
[
'babeld'
,
'-C'
,
'redistribute local ip %s'
%
(
utils
.
config
.
internal_ip
),
'-C'
,
'redistribute local deny'
,
# Route VIFIB ip adresses
'-C'
,
'in ip %s::/%u'
%
(
utils
.
ipFromBin
(
utils
.
config
.
vifibnet
),
len
(
utils
.
config
.
vifibnet
)),
# Route only addresse in the 'local' network,
# or other entire networks
#'-C', 'in ip %s' % (config.internal_ip),
#'-C', 'in ip ::/0 le %s' % network_mask,
# Don't route other addresses
'-C'
,
'in deny'
,
'-d'
,
str
(
utils
.
config
.
verbose
),
'-s'
,
]
if
utils
.
config
.
babel_state
:
args
+=
'-S'
,
utils
.
config
.
babel_state
args
=
args
+
[
'vifibnet'
]
+
list
(
tunnelmanager
.
free_interface_set
)
if
utils
.
config
.
verbose
>=
5
:
print
args
return
subprocess
.
Popen
(
args
,
**
kw
)
import
db
,
openvpn
,
upnpigd
,
utils
,
tunnelmanager
def
handle_message
(
msg
):
script_type
,
arg
=
msg
.
split
()
...
...
@@ -46,7 +19,7 @@ def handle_message(msg):
def
main
():
# Get arguments
utils
.
getConfig
()
# Setup database
tunnelmanager
.
peers_db
=
db
.
PeersDB
(
utils
.
config
.
db
)
...
...
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