mirror of
https://github.com/rekryt/iplist.git
synced 2025-10-13 08:59:34 +03:00
docs: use groups for mikrotik lists names, update script format
This commit is contained in:
27
README.en.md
27
README.en.md
@@ -148,35 +148,32 @@ php index.php
|
|||||||
|
|
||||||
## Setting up Mikrotik
|
## Setting up Mikrotik
|
||||||
- In the router's admin panel (or via winbox), navigate to System -> Scripts.
|
- In the router's admin panel (or via winbox), navigate to System -> Scripts.
|
||||||
- Create a new script by clicking "Add new" and give it a name, for example `iplist_youtube_v4_cidr`
|
- Create a new script by clicking "Add new" and give it a name, for example `iplist_v4_cidr`
|
||||||
- In the `Source` field, enter the following code (replace `url` with your server's address, and the protocol in `mode` may differ):
|
- In the `Source` field, enter the following code (replace `url` with your server's address, and the protocol in `mode` may differ):
|
||||||
```
|
```
|
||||||
/tool fetch url="https://iplist.opencck.org/?format=mikrotik&site=youtube.com&data=cidr4" mode=https dst-path=iplist_youtube_v4_cidr.rsc
|
/tool fetch url="https://iplist.opencck.org/?format=mikrotik&data=cidr4" mode=https dst-path=iplist_v4_cidr.rsc
|
||||||
:delay 5s
|
:delay 5s
|
||||||
:log info "Downloaded iplist_youtube_v4_cidr.rsc succesfully";
|
:log info "Downloaded iplist_v4_cidr.rsc succesfully";
|
||||||
|
|
||||||
/ip firewall address-list remove [find where comment="youtube.com"];
|
/import file-name=iplist_v4_cidr.rsc
|
||||||
:delay 5s
|
|
||||||
|
|
||||||
/import file-name=iplist_youtube_v4_cidr.rsc
|
|
||||||
:delay 10s
|
:delay 10s
|
||||||
:log info "New iplist_youtube_v4_cidr added successfully";
|
:log info "New iplist_v4_cidr added successfully";
|
||||||
```
|
```
|
||||||
- 
|
- 
|
||||||
- Save the script
|
- Save the script
|
||||||
- Go to System -> Scheduler
|
- Go to System -> Scheduler
|
||||||
- Create a new task with a name of your choice, for example `iplist_youtube_v4_cidr`
|
- Create a new task with a name of your choice, for example `iplist_v4_cidr`
|
||||||
- Set the `Start time` for the task (e.g., `00:05:00`). For Interval, enter `1d 00:00:00`.
|
- Set the `Start time` for the task (e.g., `00:05:00`). For Interval, enter `1d 00:00:00`.
|
||||||
- In the `On event` field, enter the script name
|
- In the `On event` field, enter the script name
|
||||||
```
|
```
|
||||||
iplist_youtube_v4_cidr
|
iplist_youtube_v4_cidr
|
||||||
```
|
```
|
||||||
- 
|
- 
|
||||||
- Open the script in System -> Scripts and run it by clicking the `Run Script` button
|
- Open the script in System -> Scripts and run it by clicking the `Run Script` button
|
||||||
- In the Logs section, you should see the message `New iplist_youtube_v4_cidr added successfully`
|
- In the Logs section, you should see the message `New iplist_v4_cidr added successfully`
|
||||||
- 
|
- 
|
||||||
- In IP -> Firewall -> Address Lists, a new list should appear (in this example, named `youtube.com`)
|
- In IP -> Firewall -> Address Lists, a new list should appear (in this example, named `youtube`)
|
||||||
- 
|
- 
|
||||||
|
|
||||||
## Setting up HomeProxy (sing-box)
|
## Setting up HomeProxy (sing-box)
|
||||||
Enable "Routing mode" in "Only proxy mainland China":
|
Enable "Routing mode" in "Only proxy mainland China":
|
||||||
|
25
README.md
25
README.md
@@ -156,35 +156,32 @@ php index.php
|
|||||||
|
|
||||||
## Настройка Mikrotik
|
## Настройка Mikrotik
|
||||||
- В администраторской панели роутера (или через winbox) откройте раздел System -> Scripts
|
- В администраторской панели роутера (или через winbox) откройте раздел System -> Scripts
|
||||||
- Создайте новый скрипт "Add new" с произвольным именем, например `iplist_youtube_v4_cidr`
|
- Создайте новый скрипт "Add new" с произвольным именем, например `iplist_v4_cidr`
|
||||||
- В поле `Source` введите следующий код (используйте `url` адрес вашего сервера, протокол в `mode` тоже может отличаться):
|
- В поле `Source` введите следующий код (используйте `url` адрес вашего сервера, протокол в `mode` тоже может отличаться):
|
||||||
```
|
```
|
||||||
/tool fetch url="https://iplist.opencck.org/?format=mikrotik&site=youtube.com&data=cidr4" mode=https dst-path=iplist_youtube_v4_cidr.rsc
|
/tool fetch url="https://iplist.opencck.org/?format=mikrotik&data=cidr4" mode=https dst-path=iplist_v4_cidr.rsc
|
||||||
:delay 5s
|
:delay 5s
|
||||||
:log info "Downloaded iplist_youtube_v4_cidr.rsc succesfully";
|
:log info "Downloaded iplist_v4_cidr.rsc succesfully";
|
||||||
|
|
||||||
/ip firewall address-list remove [find where comment="youtube.com"];
|
/import file-name=iplist_v4_cidr.rsc
|
||||||
:delay 5s
|
|
||||||
|
|
||||||
/import file-name=iplist_youtube_v4_cidr.rsc
|
|
||||||
:delay 10s
|
:delay 10s
|
||||||
:log info "New iplist_youtube_v4_cidr added successfully";
|
:log info "New iplist_v4_cidr added successfully";
|
||||||
```
|
```
|
||||||
- 
|
- 
|
||||||
- Сохраните скрипт
|
- Сохраните скрипт
|
||||||
- Откройте раздел планировщика System -> Scheduler
|
- Откройте раздел планировщика System -> Scheduler
|
||||||
- Создайте новое задание с произвольным именем, например `iplist_youtube_v4_cidr`
|
- Создайте новое задание с произвольным именем, например `iplist_v4_cidr`
|
||||||
- В качестве `Start time` укажите время для старта задания (пример: `00:05:00`). Для `Interval` введите значение `1d 00:00:00`.
|
- В качестве `Start time` укажите время для старта задания (пример: `00:05:00`). Для `Interval` введите значение `1d 00:00:00`.
|
||||||
- В поле `On event` введите имя скрипта
|
- В поле `On event` введите имя скрипта
|
||||||
```
|
```
|
||||||
iplist_youtube_v4_cidr
|
iplist_youtube_v4_cidr
|
||||||
```
|
```
|
||||||
- 
|
- 
|
||||||
- Откройте скрипт в разделе System -> Scripts и запустите его нажатием на кнопку `Run Script`
|
- Откройте скрипт в разделе System -> Scripts и запустите его нажатием на кнопку `Run Script`
|
||||||
- В разделе Logs вы должны увидеть сообщение `New iplist_youtube_v4_cidr added successfully`
|
- В разделе Logs вы должны увидеть сообщение `New iplist_v4_cidr added successfully`
|
||||||
- 
|
- 
|
||||||
- А в разделе IP -> Firewall -> Address Lists должен появиться новый список (в примере с именем `youtube.com`)
|
- А в разделе IP -> Firewall -> Address Lists должен появиться новый список (в примере с именем `youtube.com`)
|
||||||
- 
|
- 
|
||||||
|
|
||||||
## Настройка HomeProxy (sing-box)
|
## Настройка HomeProxy (sing-box)
|
||||||
Включите "Routing mode" в "Only proxy mainland China":
|
Включите "Routing mode" в "Only proxy mainland China":
|
||||||
|
Reference in New Issue
Block a user