Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nextgen-router
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
MyCard
nextgen-router
Commits
d6109922
Commit
d6109922
authored
Dec 08, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dns
parent
77f87c9a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
16 deletions
+81
-16
files/dnsmasq/dnsmasq.conf.j2
files/dnsmasq/dnsmasq.conf.j2
+3
-3
files/dnsmasq/docker-compose.yml
files/dnsmasq/docker-compose.yml
+10
-10
files/dnsmasq/smartdns.conf.j2
files/dnsmasq/smartdns.conf.j2
+8
-3
services.yaml
services.yaml
+49
-0
variables.yaml
variables.yaml
+11
-0
No files found.
files/dnsmasq/dnsmasq.conf.j2
View file @
d6109922
server=127.0.0.1#55
no-resolv
strict-order
interface=lo
,
{% for br in bridges %},{{br.name}}{% endfor %}
interface=lo{% for br in bridges %},{{br.name}}{% endfor %}
bind-interfaces
port=53
...
...
@@ -11,12 +11,12 @@ dhcp-no-override
dhcp-authoritative
enable-ra
no-dhcp-interface=lo
,
{% for br in bridges %}{% if not br.dhcp %},{{br.name}}{% endif %}{% endfor %}
no-dhcp-interface=lo{% for br in bridges %}{% if not br.dhcp %},{{br.name}}{% endif %}{% endfor %}
{% for br in bridges %}
{% if br.dhcp %}
dhcp-range={{br.name}},{{br.
start}},{{br.end}},{{br
.time}}
dhcp-range={{br.name}},{{br.
dhcp.start}},{{br.dhcp.end}},{{br.dhcp
.time}}
{% if br.ipv6 %}
dhcp-range=tag:{{br.name}},::,constructor:{{br.name}},ra-names,24h
...
...
files/dnsmasq/docker-compose.yml
View file @
d6109922
version
:
'
2.4'
services
:
smartdns
:
restart
:
always
image
:
git-registry.mycard.moe/nanahira/docker-smartdns
network_mode
:
host
command
:
-f -x -c /etc/smartdns/smartdns.conf
volumes
:
-
./smartdns:/etc/smartdns:ro
-
./smartdns-cache:/tmp/smartdns-cache
dnsmasq
:
restart
:
always
image
:
git-registry.mycard.moe/nanahira/dnsmasq
...
...
@@ -10,13 +18,5 @@ services:
-
'
./dnsmasq.conf:/etc/dnsmasq.conf:ro'
-
'
./dnsmasq.d:/etc/dnsmasq.d:ro'
-
'
./misc:/var/lib/misc'
smartdns
:
restart
:
always
image
:
git-registry.mycard.moe/nanahira/docker-smartdns
ports
:
-
'
55:53'
-
'
55:53/udp'
command
:
-f -x -c /etc/smartdns/smartdns.conf
volumes
:
-
./smartdns:/etc/smartdns:ro
-
./smartdns-cache:/tmp/smartdns-cache
depends_on
:
-
smartdns
files/dnsmasq/smartdns.conf.j2
View file @
d6109922
server-name mycard-smartdns
bind-tcp [::]:5
3
bind [::]:5
3
bind-tcp [::]:5
5
bind [::]:5
5
tcp-idle-time 3
cache-size 4096
...
...
@@ -18,7 +18,7 @@ rr-ttl-max 86400
log-level warn
{% if smartdns
_
disable_ipv6 %}
{% if smartdns
.
disable_ipv6 %}
force-AAAA-SOA yes
{% else %}
dualstack-ip-selection yes
...
...
@@ -29,6 +29,11 @@ dualstack-ip-selection yes
server-tls {{dns}} -group tls
{% endfor %}
# HTTPS DNSes
{% for dns in smartdns.https_dns %}
server-https {{dns}} -group tls
{% endfor %}
# China DNSes
{% for dns in smartdns.china_dns %}
server {{dns}} -group china -exclude-default-group
...
...
services.yaml
0 → 100644
View file @
d6109922
---
-
hosts
:
router_nextgen
remote_user
:
root
vars
:
mycard_domains
:
-
mycard.moe
-
momobako.com
-
yuzurisa.com
-
moecube.com
-
moestart.com
-
moenext.com
-
ygobbs.com
-
newwise.com
-
my-card.in
-
mius.pro
tasks
:
-
name
:
dnsmasq directory
file
:
name
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns'
state
:
directory
recurse
:
true
-
name
:
dnsmasq docker-compose
copy
:
src
:
./files/dnsmasq/docker-compose.yml
dest
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq/docker-compose.yml'
-
name
:
dnsmasq.conf
template
:
src
:
./files/dnsmasq/dnsmasq.conf.j2
dest
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq/dnsmasq.conf'
notify
:
restart_dnsmasq
-
name
:
smartdns.conf
template
:
src
:
./files/dnsmasq/smartdns.conf.j2
dest
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns/smartdns.conf'
notify
:
restart_dnsmasq
-
name
:
smartdns china list
copy
:
src
:
./data/china-list.conf
dest
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns/china-list.conf'
notify
:
restart_dnsmasq
-
name
:
start dnsmasq
docker_compose
:
project_src
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq'
remove_orphans
:
true
handlers
:
-
name
:
restart_dnsmasq
docker_compose
:
project_src
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq'
restarted
:
true
variables.yaml
View file @
d6109922
...
...
@@ -57,3 +57,14 @@ vars:
link
:
bond0.41
# 上行链路
username
:
user
# 拨号用户名,密码在上面的pppoeUsers给出
mac
:
null
# 给ISP看的mac地址,null为随机
smartdns
:
disable_ipv6
:
false
tls_dns
:
-
8.8.8.8
-
1.1.1.1
https_dns
:
-
https://cloudflare-dns.com/dns-query
-
https://dns.quad9.net/dns-query
china_dns
:
-
114.114.114.114
-
223.5.5.5
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