mirror of
https://github.com/itdoginfo/ansible-openwrt-hirkn.git
synced 2025-12-13 18:44:31 +05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aae9c50f10 | ||
|
|
db0d06408a | ||
|
|
b5b6a7ad5f | ||
|
|
3fdf04518f | ||
|
|
5f015d069f | ||
|
|
76fcd4860f | ||
|
|
96c8ceee44 | ||
|
|
92f25df564 |
4
.github/workflows/public-galaxy.yml
vendored
4
.github/workflows/public-galaxy.yml
vendored
@@ -2,7 +2,6 @@ name: Public to Ansible Galaxy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "role" ]
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
@@ -15,5 +14,4 @@ jobs:
|
||||
- name: Publish Ansible role to Galaxy
|
||||
uses: robertdebock/galaxy-action@1.2.1
|
||||
with:
|
||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
||||
git_branch: 0.1.3
|
||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
||||
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
|
||||
|
||||
19
README.md
19
README.md
@@ -1,7 +1,7 @@
|
||||
[English role README](https://github.com/itdoginfo/domain-routing-openwrt/blob/role/README.EN.md)
|
||||
[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