mirror of
https://github.com/itdoginfo/ansible-openwrt-hirkn.git
synced 2025-12-13 10:34:29 +05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aae9c50f10 | ||
|
|
db0d06408a | ||
|
|
b5b6a7ad5f | ||
|
|
3fdf04518f | ||
|
|
5f015d069f | ||
|
|
76fcd4860f | ||
|
|
96c8ceee44 |
1
.github/workflows/public-galaxy.yml
vendored
1
.github/workflows/public-galaxy.yml
vendored
@@ -2,7 +2,6 @@ name: Public to Ansible Galaxy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
|
||||
14
README.EN.md
14
README.EN.md
@@ -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
|
||||
|
||||
17
README.md
17
README.md
@@ -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
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
- name: Restart sing-box
|
||||
service:
|
||||
name: sing-box
|
||||
state: restarted
|
||||
|
||||
- name: Restart network
|
||||
service:
|
||||
name: network
|
||||
|
||||
Reference in New Issue
Block a user