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
e57895fe
Commit
e57895fe
authored
Mar 25, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes while deploying
parent
5c3adadb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
15 deletions
+23
-15
ansible/ansible.cfg
ansible/ansible.cfg
+1
-1
ansible/bird.conf.j2
ansible/bird.conf.j2
+9
-8
ansible/configure.yaml
ansible/configure.yaml
+5
-5
ansible/scripts/global-postdown.sh.j2
ansible/scripts/global-postdown.sh.j2
+3
-0
ansible/scripts/global-postup.sh.j2
ansible/scripts/global-postup.sh.j2
+4
-0
src/inventory.ts
src/inventory.ts
+1
-1
No files found.
ansible/ansible.cfg
View file @
e57895fe
[defaults]
host_key_checking = False
strategy_plugins = mitogen-0.2.9/ansible_mitogen/plugins/strategy
strategy = mitogen_
linear
strategy = mitogen_
free
ansible/bird.conf.j2
View file @
e57895fe
...
...
@@ -3,18 +3,19 @@ router id {{address}};
protocol device {
}
protocol direct {
disabled;
ipv4;
ipv6;
}
#
protocol direct {
#
disabled;
#
ipv4;
#
ipv6;
#
}
{% for interface in lan_interfaces %}
protocol direct {
ipv4 {
import all;
};
ipv4;
ipv6;
interface "{{interface}}";
}
{% endfor %}
protocol kernel {
ipv4 {
...
...
ansible/configure.yaml
View file @
e57895fe
...
...
@@ -24,11 +24,11 @@
# conn: '{{item}}'
# with_items: '{{ connections }}'
# when: "item.protocol == 'null'"
-
name
:
'
loop
through
list
from
a
variable'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
vars
:
conn
:
'
{{item}}'
with_items
:
'
{{
connections
}}'
#
- name: 'loop through list from a variable'
#
include_tasks: 'protocols/{{item.protocol}}/configure.yaml'
#
vars:
#
conn: '{{item}}'
#
with_items: '{{ connections }}'
# when: "item.protocol != 'null'"
-
name
:
'
frps'
include_tasks
:
'
protocols/wgfrp/frps.yaml'
...
...
ansible/scripts/global-postdown.sh.j2
View file @
e57895fe
#!/usr/bin/env bash
{
%
for
net
in
route_lists.mycard %
}
ip rule del pref 299 to
{{
net
}}
lookup main
{
% endfor %
}
# 针对网关设置mark
{
%
for
gateway
in
gateways %
}
...
...
ansible/scripts/global-postup.sh.j2
View file @
e57895fe
...
...
@@ -5,6 +5,10 @@
ipset restore
-f
/etc/wireguard/
{{
list
}}
.ipset
{
% endfor %
}
{
%
for
net
in
route_lists.mycard %
}
ip rule add pref 299 to
{{
net
}}
lookup main
{
% endfor %
}
# 针对网关设置mark
{
%
for
gateway
in
gateways %
}
...
...
src/inventory.ts
View file @
e57895fe
...
...
@@ -56,7 +56,7 @@ class InventoryBuilder {
plan
.
gatewayAddress
=
hosts
[
plan
.
gateway
].
address
;
}
// 所有内网网段
this
.
route_lists
.
mycard
=
[
"
10.19
9
.0.0/16
"
,
"
10.200.0.0/15
"
];
this
.
route_lists
.
mycard
=
[
"
10.19
8
.0.0/16
"
,
"
10.200.0.0/15
"
];
for
(
const
h
in
this
.
hosts
)
{
const
host
=
this
.
hosts
[
h
]
for
(
const
c
of
host
.
subnets
.
split
(
"
,
"
))
{
...
...
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