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
zhifan huang
re6stnet
Commits
66d7d106
Commit
66d7d106
authored
Jul 03, 2012
by
Ulysse Beaugnon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scripts to set up the insterfaces
parent
dcc76a0d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
0 deletions
+57
-0
openvpn.py
openvpn.py
+46
-0
tests.py
tests.py
+3
-0
up-client
up-client
+4
-0
up-server
up-server
+4
-0
No files found.
openvpn.py
0 → 100644
View file @
66d7d106
from
subprocess
import
call
from
configuration
import
*
def
LaunchClient
(
serverAddress
,
serverPort
):
if
config
.
Debug
:
print
'Connecting to :'
+
serverAddress
call
([
'openvpn'
,
'--client'
,
'--dev'
,
'tap'
,
'--proto'
,
'udp'
,
'--remote'
,
serverAddress
,
str
(
serverPort
),
'--nobind'
,
'--script-security'
,
'2'
,
'--up'
,
'./up-client'
,
'--persist-key'
,
'--persist-tun'
,
'--tls-client'
,
'--ca'
,
config
.
CaPath
,
'--cert'
,
config
.
CertPath
,
'--key'
,
config
.
KeyPath
,
'--user'
,
'nobody'
,
'--verb'
,
'3'
,
'--daemon'
,
'openVpnClient('
+
serverAddress
+
')'
])
def
LaunchServer
():
call
([
'openvpn'
,
'--dev'
,
'tap'
,
'--mode'
,
'server'
,
'--proto'
,
'udp'
,
'--tls-server'
,
'--ca'
,
config
.
CaPath
,
'--cert'
,
config
.
CertPath
,
'--key'
,
config
.
KeyPath
,
'--dh'
,
config
.
DhPath
,
'--user'
,
'nobody'
,
'--port'
,
str
(
config
.
LocalPort
),
'--up'
,
'./up-server '
+
config
.
IPv6
,
'--script-security'
,
'2'
,
'--persist-tun'
,
'--persist-key'
,
'--daemon'
,
'openvpnServer'
,
'--verb'
,
'3'
])
# TODO : should we use comp-lzo option ?
# TODO : group nobody
tests.py
0 → 100644
View file @
66d7d106
import
upnpigd
print
"Running tests"
up-client
0 → 100755
View file @
66d7d106
#!/bin/sh -e
ifconfig
$dev
up
up-server
0 → 100755
View file @
66d7d106
#!/bin/sh -e
ifconfig
$dev
up
ifconfig
$dev
inet6 add
$1
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