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
Boris Kocherov
re6stnet
Commits
6a9571a9
Commit
6a9571a9
authored
Apr 26, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add all tap-drivers at startup;
Add subnet route at artup; Remove --persist-tun for openvpn;
parent
e599e3aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
re6st/plib.py
re6st/plib.py
+1
-1
re6stnet
re6stnet
+10
-2
No files found.
re6st/plib.py
View file @
6a9571a9
...
@@ -10,7 +10,7 @@ def openvpn(iface, encrypt, *args, **kw):
...
@@ -10,7 +10,7 @@ def openvpn(iface, encrypt, *args, **kw):
args
=
[
'openvpn'
,
args
=
[
'openvpn'
,
'--dev-type'
,
'tap'
,
'--dev-type'
,
'tap'
,
'--dev-node'
if
sys
.
platform
==
'cygwin'
else
'--dev'
,
iface
,
'--dev-node'
if
sys
.
platform
==
'cygwin'
else
'--dev'
,
iface
,
'--persist-tun'
,
'
'
if
sys
.
platform
==
'cygwin'
else
'
--persist-tun'
,
'--persist-key'
,
'--persist-key'
,
'--script-security'
,
'2'
,
'--script-security'
,
'2'
,
'--up'
,
ovpn_client
,
'--up'
,
ovpn_client
,
...
...
re6stnet
View file @
6a9571a9
...
@@ -271,6 +271,9 @@ def main():
...
@@ -271,6 +271,9 @@ def main():
# not even remove it on exit.
# not even remove it on exit.
subprocess
.
call
(
if_rt
)
subprocess
.
call
(
if_rt
)
if_rt
[
4
]
=
my_subnet
if_rt
[
4
]
=
my_subnet
if
sys
.
platform
==
'cygwin'
:
ip
(
'route'
,
my_subnet
,
'dev'
,
config
.
main_interface
)
else
:
cleanup
.
append
(
lambda
:
subprocess
.
call
(
if_rt
))
cleanup
.
append
(
lambda
:
subprocess
.
call
(
if_rt
))
x
=
[
my_network
]
x
=
[
my_network
]
if
config
.
table
:
if
config
.
table
:
...
@@ -302,6 +305,11 @@ def main():
...
@@ -302,6 +305,11 @@ def main():
for
cmd
in
config
.
daemon
or
():
for
cmd
in
config
.
daemon
or
():
cleanup
.
append
(
utils
.
Popen
(
cmd
,
shell
=
True
).
stop
)
cleanup
.
append
(
utils
.
Popen
(
cmd
,
shell
=
True
).
stop
)
# adding tap-windows driver will break others, so we add
# all drivers here
if
sys
.
platform
==
'cygwin'
:
[
ip
(
'vpntap'
,
'dev'
,
x
)
for
x
in
tunnel_interfaces
]
# main loop
# main loop
if
tunnel_manager
is
None
:
if
tunnel_manager
is
None
:
sys
.
exit
(
os
.
WEXITSTATUS
(
os
.
wait
()[
1
]))
sys
.
exit
(
os
.
WEXITSTATUS
(
os
.
wait
()[
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