Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tun
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
tun
Commits
85ef51a1
Commit
85ef51a1
authored
Apr 14, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a flag for global postup
parent
c5607d68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
ansible/configure.yaml
ansible/configure.yaml
+4
-0
ansible/scripts/global-postdown.sh.j2
ansible/scripts/global-postdown.sh.j2
+2
-0
ansible/scripts/global-postup.sh.j2
ansible/scripts/global-postup.sh.j2
+2
-0
No files found.
ansible/configure.yaml
View file @
85ef51a1
...
@@ -17,6 +17,10 @@
...
@@ -17,6 +17,10 @@
src
:
scripts/ipset.j2
src
:
scripts/ipset.j2
dest
:
'
/etc/wireguard/{{item}}.ipset'
dest
:
'
/etc/wireguard/{{item}}.ipset'
with_items
:
'
{{route_list_names}}'
with_items
:
'
{{route_list_names}}'
-
name
:
global-postup
shell
:
/etc/wireguard/global-postup.sh
args
:
creates
:
/tmp/mycard_global_postup_done
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
-
name
:
'
clean
up
null
connections
first'
-
name
:
'
clean
up
null
connections
first'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
...
...
ansible/scripts/global-postdown.sh.j2
View file @
85ef51a1
...
@@ -37,4 +37,6 @@ iptables -t mangle -D PREROUTING -m set --match-set ladder_needed src -m set --m
...
@@ -37,4 +37,6 @@ iptables -t mangle -D PREROUTING -m set --match-set ladder_needed src -m set --m
ipset destroy
{{
list
}}
ipset destroy
{{
list
}}
{
% endfor %
}
{
% endfor %
}
rm
-rf
/tmp/mycard_global_postup_done
exit
0
exit
0
ansible/scripts/global-postup.sh.j2
View file @
85ef51a1
...
@@ -39,4 +39,6 @@ ip rule add pref 301 fwmark {{gateway.mark}} lookup {{gateway.mark}}
...
@@ -39,4 +39,6 @@ ip rule add pref 301 fwmark {{gateway.mark}} lookup {{gateway.mark}}
# 临时梯子
# 临时梯子
iptables
-t
mangle
-A
PREROUTING
-m
set
--match-set
ladder_needed src
-m
set
--match-set
gfwiplist dst
-j
MARK
--set-xmark
812/0xffffffff
iptables
-t
mangle
-A
PREROUTING
-m
set
--match-set
ladder_needed src
-m
set
--match-set
gfwiplist dst
-j
MARK
--set-xmark
812/0xffffffff
echo
1
>
/tmp/mycard_global_postup_done
exit
0
exit
0
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