Skip to content

Commit

Permalink
Merge pull request #9 from itdoginfo/role
Browse files Browse the repository at this point in the history
Conversion to a role
  • Loading branch information
itdoginfo authored Apr 18, 2024
2 parents 8ca4fb0 + 92f25df commit 96c8cee
Show file tree
Hide file tree
Showing 9 changed files with 325 additions and 154 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/public-galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Public to Ansible Galaxy

on:
push:
branches: [ "master" ]
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Publish Ansible role to Galaxy
uses: robertdebock/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
107 changes: 107 additions & 0 deletions README.EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
Domain routing OpenWrt
=========

Configuring domain routing on Openwrt router.


Role Variables
--------------

Lists
```
country: russia-inside|russia-outside|ukraine
list_domains: true|falase
list_subnet: false|true
list_ip: false|true
list_community: false|true
```

Tunnel
```
tunnel: wg|openvpn|singbox|tun2socks
```

DoH or DoT
```
dns_encrypt: false|dnscrypt|stubby
```

Nano package
```
nano: true|false
```

Acces from wg network to router
```
wg_access: false|true
wg_access_network: 192.168.80.0/24 (for example)
```

If wireguard is used:
```
wg_server_address: wg-server-host
wg_private_key: privatekey-client
wg_public_key: publickey-client
wg_preshared_key: presharedkey-client
wg_client_port: 51820
wg_client_address: ip-client
wg_access: true
wg_access_network: wg-network
```

Dependencies
------------

[gekmihesg.openwrt](https://github.com/gekmihesg/ansible-openwrt)


Example Playbook
----------------

The inventory file must contain the group `[openwrt]` where your router will be located.


Wireguard, only domains, stubby, Russia, acces from wg network, host 192.168.1.1
```
- hosts: 192.168.1.1
remote_user: root
roles:
- domain-routing-openwrt
vars:
tunnel: wg
dns_encrypt: stubby
country: russia-inside
wg_access: true
wg_server_address: wg-server-host
wg_private_key: privatekey-client
wg_public_key: publickey-client
wg_preshared_key: presharedkey-client
wg_listen_port: 51820
wg_client_port: 51820
wg_client_address: ip-client
wg_access_network: wg-network
```

Sing-box, stubby, Russia
```
- hosts: 192.168.1.1
remote_user: root
roles:
- domain-routing-openwrt
vars:
tunnel: singbox
dns_encrypt: stubby
country: russia-inside
```

License
-------

GNU General Public License v3.0
Loading

0 comments on commit 96c8cee

Please sign in to comment.