6 Commits
0.1.4 ... 0.1.7

Author SHA1 Message Date
itdoginfo
aae9c50f10 Fix examples 2024-05-06 14:05:03 +03:00
itdoginfo
db0d06408a Fix order 2024-05-06 13:48:30 +03:00
itdoginfo
b5b6a7ad5f Added sing-box handler 2024-05-05 19:25:13 +03:00
itdoginfo
3fdf04518f Fix 2024-04-18 17:24:24 +03:00
itdoginfo
5f015d069f Fixed workflow 2024-04-18 17:21:38 +03:00
itdoginfo
76fcd4860f Several fixes 2024-04-18 17:14:35 +03:00
5 changed files with 31 additions and 8 deletions

View File

@@ -2,7 +2,6 @@ name: Public to Ansible Galaxy
on:
push:
branches: [ "master" ]
tags:
- '*'

View File

@@ -69,7 +69,7 @@ Wireguard, only domains, stubby, Russia, acces from wg network, host 192.168.1.1
remote_user: root
roles:
- domain-routing-openwrt
- itdoginfo.domain_routing_openwrt
vars:
tunnel: wg
@@ -93,12 +93,22 @@ Sing-box, stubby, Russia
remote_user: root
roles:
- domain-routing-openwrt
- itdoginfo.domain_routing_openwrt
vars:
tunnel: singbox
dns_encrypt: stubby
country: russia-inside
tasks:
- name: sing-box config
template:
src: "templates/openwrt-sing-box-json.j2"
dest: "/etc/sing-box/config.json"
mode: 0644
notify:
- Restart sing-box
- Restart network
```
License

View File

@@ -1,7 +1,7 @@
[English role README](https://github.com/itdoginfo/domain-routing-openwrt/blob/master/README.EN.md)
# Описание
Shell скрипт и playbook для Ansible. Автоматизируют настройку роутера на OpenWrt для роутинга по доменам и спискам IP-адресов.
Shell скрипт и [роль для Ansible](https://galaxy.ansible.com/ui/standalone/roles/itdoginfo/domain_routing_openwrt). Автоматизируют настройку роутера на OpenWrt для роутинга по доменам и спискам IP-адресов.
Полное описание происходящего:
- [Статья на хабре](https://habr.com/ru/articles/767464/)
@@ -44,7 +44,7 @@ ansible-galaxy role install itdoginfo.domain_routing_openwrt
Примеры playbooks
Wireguard, only domains, stubby, Russia, acces from wg network (примерное значение 192.168.80.0/24), host 192.168.1.1
Wireguard, only domains, stubby, Russia, acces from wg network (пример 192.168.80.0/24), host 192.168.1.1
```
- hosts: 192.168.1.1
remote_user: root
@@ -81,6 +81,16 @@ Sing-box, stubby, Russia
tunnel: singbox
dns_encrypt: stubby
country: russia-inside
tasks:
- name: sing-box config
template:
src: "templates/openwrt-sing-box-json.j2"
dest: "/etc/sing-box/config.json"
mode: 0644
notify:
- Restart sing-box
- Restart network
```
В inventory файле роутер обязательно должен быть в группе `[openwrt]`
@@ -183,8 +193,7 @@ service getdomains start
[Инструкция для OpenWrt 21.02](https://t.me/itdoginfo/8)
## Текстовый редактор nano
Устанавливается по умолчанию
Можно выключить
Устанавливается по умолчанию. Можно выключить
```
nano: false
```

View File

@@ -134,7 +134,7 @@ if [ "$WG" == true ]; then
if [ $ROUTE_TABLE -eq 1 ]; then
checkpoint_true "Route table WG"
else
checkpoint_false "Route table VPN"
checkpoint_false "Route table WG"
echo "Details: https://cli.co/Atxr6U3"
fi
fi

View File

@@ -1,4 +1,9 @@
---
- name: Restart sing-box
service:
name: sing-box
state: restarted
- name: Restart network
service:
name: network