Jump to content

Tiko

Forum Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Tiko

  1. 37 минут назад, drfischer сказал:

    Но можно WireGuard использовать в связке со скриптом?

    Можно, у меня как раз с ним работает.

     

    37 минут назад, drfischer сказал:

    Как я понял надо именно этот интерфейс указать в строке VPN1 в файле add-bird4_routes.sh ?

    Не только в этом файле прописан интерфейс, например в bird4.conf 7 строка. Не проще переустановить скрипт с указанием нужных интерфейсов?

  2. 1 час назад, alexandr-ad сказал:

    Разве что между моими двумя замерами, ip уже успел поменяться туда-обратно.

    Если с остальными адресами все нормально, то дело не в сбросе маршрута, а в смене ip домена. Через что проверяете ip?

    Во всяком случае, собранный мною список ip пока хватает, все работает.

    Если в какой-то момент перестают грузиться аватарки в ютуб, просто чекаем ip домена через cmd командой nslookup yt3.ggpht.com , полученный ip добавляем в список.

  3. 14 часа назад, alexandr-ad сказал:

    Т.е. все работает, а через какое-то время маршрут к yt3.ggpht.com может пойти через провайдера, другие пойдут как и положено через впн. Лечится запуском add-bird4_routes.sh... до следующего раза.

    Доброй ночи! 

    Обратите внимание, что у yt3.ggpht.com не статический ip адрес, он постоянно меняется, тоже столкнулся с данной проблемой, пока решается отловом всех ip адресов и запись их в user-vpn.list.

    yt3.ggpht.com
    62.173.139.234
    64.233.161.132
    64.233.161.198
    64.233.162.198
    64.233.164.132
    64.233.164.198
    64.233.165.198
    74.125.131.198
    74.125.205.198
    108.177.14.198
    142.250.74.161
    142.250.150.198
    142.251.1.198
    142.251.5.198
    173.194.73.198
    173.194.221.198
    173.194.222.198
    188.43.20.67
    188.186.146.207
    188.186.154.88
    194.67.1.14
    209.85.233.198

     

  4. 6 минут назад, DennoN сказал:

    Но лучше на роутере настроить DOT/DOH сервера, благо кинетик умеет из коробки в вэб морде все это настраивать

    Спасибо за ответ, сделал чуть проще, добавил для WireGuard dns 1.1.1.1, VPN CloudFlare WARP если что, все работает.

    Насчет DOT/DOH , пока не разбирался что такое, краем уха слышал, пока надобности нет, оставил днс провайдера, а для впн свой днс.

  5. Всем доброго! 

    Сегодня перестала работать с пк и браузера телефона инста и фб, причем с приложения все работает.

    При добавлении в user-vpn.list домен instagram.com и вводе команды ./Bird4Static/scripts/add-bird4_routes.sh

    Выдает такое сообщение:

    iprange: DNS: 'instagram.com' will be retried: Temporary failure in name resolution
    iprange: DNS: 'instagram.com' will be retried: Temporary failure in name resolution
    iprange: DNS: 'instagram.com' will be retried: Temporary failure in name resolution
    iprange: DNS: 'instagram.com' will be retried: Temporary failure in name resolution
    iprange: DNS: 'instagram.com' will be retried: Temporary failure in name resolution
    и т.д.

    Через nslookup тоже не выдает ip адрес инсты:

    C:\Users\TusaJuice>nslookup instagram.com
    ╤хЁтхЁ:  UnKnown
    Address:  192.168.1.1
    
    *** UnKnown не удалось найти instagram.com: Query refused

    ДНС стоят по умолчанию от провайдера, поставил гугловские 8.8.8.8 инста и фб работают.

    Получается провайдер через днс как-то блочит? Но как так, трафик идет сразу через впн и провайдер не должен видеть запросы или я не прав? 

    Причем остальные сайты отлично обходятся, тот же твиттер или известные торрент сайты. Еще странно, что с телефона с приложений все работает, а с браузера нет.

  6. 7 часов назад, DennoN сказал:

    сравнил файлы. смысл в том, что адреса из antifilter.list грузятся не напрямую, а их обрабатывает утилита iprange, которая если видит, что 2 адреса стоят рядом - объединяет их в один с более большой маской. Например:

    Спасибо за информацию, так даже лучше.

     

    7 часов назад, DennoN сказал:

    ну скрипт может такое обрабатывать. я в свое время пытался использовать такую же схему, но мне не понравилось, что если остановить и запустить bird он висит минут 5, переваривает все адреса. Задержка открытия по идее не должна быть сильно больше, там поиск шустрый, но если заметишь, что что-то начинает тупить, то это первый кандидат на проверку)

     

    Если в первый раз сканирование адресов заняло 8 минут, то при ручном запуске командой ./Bird4Static/scripts/add-bird4_routes.sh сканирование заняло 1 час 35 минут, странные дела)

    Ну пока все работает, трогать не буду, только крон поставлю раз в неделю.

  7. Всем доброго!

    @DennoN Спасибо большое за скрипт, все работает!

    Есть пару моментов, я использовал список ip c antifilter.download ipresolve.lst + subnet.lst

    В файл add-bird4_routes.sh внес изменения:

    URL0=https://antifilter.download/list/ipresolve.lst
    URL1=https://antifilter.download/list/subnet.lst

    и

    curl -sk $URL0 $URL1 | sort | diff -u $BLACKLIST - | patch $BLACKLIST -

    И крон поставил раз в сутки обновлять.

    Насколько это правильно?

    Список ip адресов внушительный, 240 тыс. строк, первые несколько минут роутер был загружен на 50-60%, видать сканировал потом стало как обычно 1-6%.

    В конце выдал:

     
    Скрытый текст
    Апр 25 01:54:20
     
    bird4
    I/O loop cycle took 517336 ms for 4 events
    Апр 25 01:54:20
     
    bird4
    Kernel dropped some netlink messages, will resync on next scan.
     

    Вроде все работает. Но хотел узнать, насколько целесообразно использовать полный список заблокированных ip адресов, будут ли какие-то задержки при открытии сайтов в браузере?

    Еще заметил, в antifilter.list лежит полный список ip из ipresolve.lst + subnet.lst а это 370 тыс. строк, а в bird4-base-vpn1.list всего 240 тыс. строк, получается остальные 130 тыс. строк не просканировались?

  8. 2 часа назад, TheBB сказал:

    А точно оно надо, может есть другие варианты?

    Сперва прочитать и выполнить:

    https://github.com/Entware/Entware/wiki/Using-GCC-for-native-compilation и https://github.com/Entware/Entware/wiki/Self-installation-of-python-modules

    Дальше пытаться установить:

      Показать содержимое
    BusyBox v1.35.0 (2022-04-13 08:47:51 UTC) built-in shell (ash)
    
    ~ # python -m pip install ansible
    Collecting ansible
      Downloading ansible-5.6.0.tar.gz (35.5 MB)
         |████████████████████████████████| 35.5 MB 2.4 kB/s 
    Collecting ansible-core~=2.12.4
      Downloading ansible-core-2.12.4.tar.gz (7.8 MB)
         |████████████████████████████████| 7.8 MB 54 kB/s 
    Requirement already satisfied: jinja2 in /opt/lib/python3.10/site-packages (from ansible-core~=2.12.4->ansible) (3.1.0)
    Requirement already satisfied: PyYAML in /opt/lib/python3.10/site-packages (from ansible-core~=2.12.4->ansible) (6.0)
    Requirement already satisfied: cryptography in /opt/lib/python3.10/site-packages (from ansible-core~=2.12.4->ansible) (36.0.0)
    Collecting packaging
      Using cached packaging-21.3-py3-none-any.whl (40 kB)
    Collecting resolvelib<0.6.0,>=0.5.3
      Downloading resolvelib-0.5.4-py2.py3-none-any.whl (12 kB)
    Requirement already satisfied: cffi>=1.12 in /opt/lib/python3.10/site-packages (from cryptography->ansible-core~=2.12.4->ansible) (1.15.0)
    Requirement already satisfied: pycparser in /opt/lib/python3.10/site-packages (from cffi>=1.12->cryptography->ansible-core~=2.12.4->ansible) (2.21)
    Requirement already satisfied: MarkupSafe>=2.0 in /opt/lib/python3.10/site-packages (from jinja2->ansible-core~=2.12.4->ansible) (2.1.0)
    Collecting pyparsing!=3.0.5,>=2.0.2
      Downloading pyparsing-3.0.8-py3-none-any.whl (98 kB)
         |████████████████████████████████| 98 kB 1.0 MB/s 
    Using legacy 'setup.py install' for ansible, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for ansible-core, since package 'wheel' is not installed.
    Installing collected packages: pyparsing, resolvelib, packaging, ansible-core, ansible
        Running setup.py install for ansible-core ... done
        Running setup.py install for ansible ... done
    Successfully installed ansible-5.6.0 ansible-core-2.12.4 packaging-21.3 pyparsing-3.0.8 resolvelib-0.5.4
    WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
    WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
    You should consider upgrading via the '/opt/bin/python -m pip install --upgrade pip' command.
    ~ # 
    ~ # ansible
    ansible             ansible-connection  ansible-doc         ansible-inventory   ansible-pull        ansible-vault
    ansible-config      ansible-console     ansible-galaxy      ansible-playbook    ansible-test
    ~ # ansible --version
    -sh: ansible: not found
    ~ # 
    ~ # grep -E '^#!.*python' /opt/bin/ansible*
    /opt/bin/ansible:#!/usr/bin/env python
    /opt/bin/ansible-config:#!/usr/bin/env python
    /opt/bin/ansible-connection:#!/usr/bin/env python
    /opt/bin/ansible-console:#!/usr/bin/env python
    /opt/bin/ansible-doc:#!/usr/bin/env python
    /opt/bin/ansible-galaxy:#!/usr/bin/env python
    /opt/bin/ansible-inventory:#!/usr/bin/env python
    /opt/bin/ansible-playbook:#!/usr/bin/env python
    /opt/bin/ansible-pull:#!/usr/bin/env python
    /opt/bin/ansible-test:#!/usr/bin/env python
    /opt/bin/ansible-vault:#!/usr/bin/env python
    ~ # 
    ~ # ls -al /opt/bin/ansible*
    -rwxr-xr-x    1 root     root          5918 Apr 24 11:45 /opt/bin/ansible
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-config -> ansible
    -rwxr-xr-x    1 root     root         13400 Mar 28 21:28 /opt/bin/ansible-connection
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-console -> ansible
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-doc -> ansible
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-galaxy -> ansible
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-inventory -> ansible
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-playbook -> ansible
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-pull -> ansible
    -rwxr-xr-x    1 root     root          1477 Mar 28 21:28 /opt/bin/ansible-test
    lrwxrwxrwx    1 root     root             7 Apr 24 00:25 /opt/bin/ansible-vault -> ansible
    ~ # 
    ~ # sed -i -e 's,^#!.*python,#!/opt/bin/python,' /opt/bin/ansible
    ~ # sed -i -e 's,^#!.*python,#!/opt/bin/python,' /opt/bin/ansible-connection 
    ~ # sed -i -e 's,^#!.*python,#!/opt/bin/python,' /opt/bin/ansible-test 
    ~ # 
    ~ # ansible --version
    ansible [core 2.12.4]
      config file = None
      configured module search path = ['/opt/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /opt/lib/python3.10/site-packages/ansible
      ansible collection location = /opt/root/.ansible/collections:/usr/share/ansible/collections
      executable location = /opt/bin/ansible
      python version = 3.10.4 (main, Apr 13 2022, 08:47:51) [GCC 7.4.0]
      jinja version = 3.1.0
      libyaml = True
    ~ # 

     

     

    Спасибо, но я уже вручную все установил из файла hirkn.yml с заменой префиксов, но скрипт оказался нерабочим или где-то ошибся. Буду искать другой вариант.

  9. Установил python3-pip, попробовал установить ansible отсюда , но безуспешно.

    Вот что пишет:

    Скрытый текст

    Collecting ansible
      Downloading ansible-5.6.0.tar.gz (35.5 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.5/35.5 MB 336.2 kB/s eta 0:00:00
      Preparing metadata (setup.py) ... done
    Collecting ansible-core~=2.12.4
      Downloading ansible-core-2.12.4.tar.gz (7.8 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.8/7.8 MB 370.8 kB/s eta 0:00:00
      Preparing metadata (setup.py) ... done
    Collecting jinja2
      Using cached Jinja2-3.1.1-py3-none-any.whl (132 kB)
    Collecting PyYAML
      Using cached PyYAML-6.0.tar.gz (124 kB)
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting cryptography
      Using cached cryptography-36.0.2.tar.gz (572 kB)
      Installing build dependencies ... error
      error: subprocess-exited-with-error

      × pip subprocess to install build dependencies did not run successfully.
      │ exit code: 1
      ╰─> [80 lines of output]
          Collecting setuptools>=40.6.0
            Using cached setuptools-62.1.0-py3-none-any.whl (1.1 MB)
          Collecting wheel
            Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
          Collecting cffi>=1.12
            Using cached cffi-1.15.0.tar.gz (484 kB)
            Preparing metadata (setup.py): started
            Preparing metadata (setup.py): finished with status 'done'
          Collecting setuptools-rust>=0.11.4
            Using cached setuptools_rust-1.2.0-py3-none-any.whl (21 kB)
          Collecting pycparser
            Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
          Collecting typing-extensions>=3.7.4.3
            Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
          Collecting semantic-version<3,>=2.8.2
            Using cached semantic_version-2.9.0-py2.py3-none-any.whl (15 kB)
          Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed.
          Installing collected packages: wheel, typing-extensions, setuptools, semantic-version, pycparser, setuptools-rust, cffi
            Running setup.py install for cffi: started
            Running setup.py install for cffi: finished with status 'error'
            error: subprocess-exited-with-error

            × Running setup.py install for cffi did not run successfully.
            │ exit code: 1
            ╰─> [45 lines of output]

                    No working compiler found, or bogus compiler options passed to
                    the compiler from Python's standard "distutils" module.  See
                    the error messages above.  Likely, the problem is not related
                    to CFFI but generic to the setup.py of any Python package that
                    tries to compile C code.  (Hints: on OS/X 10.8, for errors about
                    -mno-fused-madd see http://stackoverflow.com/questions/22313407/
                    Otherwise, see https://wiki.python.org/moin/CompLangPython or
                    the IRC channel #python on irc.libera.chat.)

                    Trying to continue anyway.  If you are trying to install CFFI from
                    a build done in a different context, you can ignore this warning.

                running install
                running build
                running build_py
                creating build
                creating build/lib.linux-mips-3.10
                creating build/lib.linux-mips-3.10/cffi
                copying cffi/backend_ctypes.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/vengine_gen.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/__init__.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/lock.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/setuptools_ext.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/vengine_cpy.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/error.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/api.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/cparser.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/recompiler.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/commontypes.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/model.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/cffi_opcode.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/ffiplatform.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/pkgconfig.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/verifier.py -> build/lib.linux-mips-3.10/cffi
                copying cffi/_cffi_include.h -> build/lib.linux-mips-3.10/cffi
                copying cffi/parse_c_type.h -> build/lib.linux-mips-3.10/cffi
                copying cffi/_embedding.h -> build/lib.linux-mips-3.10/cffi
                copying cffi/_cffi_errors.h -> build/lib.linux-mips-3.10/cffi
                running build_ext
                building '_cffi_backend' extension
                creating build/temp.linux-mips-3.10
                creating build/temp.linux-mips-3.10/c
                gcc -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -mno-branch-likely -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -O2 -pipe -mno-branch-likely -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -pthread -O2 -pipe -mno-branch-likely -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -pthread -I/opt/include -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/opt/include/python3.10 -c c/_cffi_backend.c -o build/temp.linux-mips-3.10/c/_cffi_backend.o
                error: command 'gcc' failed: No such file or directory
                [end of output]

            note: This error originates from a subprocess, and is likely not a problem with pip.
          error: legacy-install-failure

          × Encountered error while trying to install package.
          ╰─> cffi

          note: This is an issue with the package mentioned above, not pip.
          hint: See above for output from the failure.
          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: subprocess-exited-with-error

    × pip subprocess to install build dependencies did not run successfully.
    │ exit code: 1
    ╰─> See above for output.

    note: This error originates from a subprocess, and is likely not a problem with pip.

    Я так полагаю он для mips грузит, а мне нужен mipsel?

  10. Всем доброго!

    Искал способ обойти блокировки сайтов на уровне роутера, нашел для себя подходящий вариант .

    Но тут возникла проблема, по инструкции, последним этапом нужно ввести команду:

    ansible-playbook hirkn.yml -i hosts

    На что я получаю такой ответ:

    -sh: ansible-playbook: not found

    Мне посоветовали дословно:

    Цитата

    Сначала загугли, что такое ansible-playbook. И поймёте, что нужно сначала установить ansible, а уж потом выполнять команду.

    Ну я пошел в гугл, там нашел несколько статей как устанавливать этот ansible, но по ним я так и не смог установить, так как инструкции не для keenetic, и по их командам там нет нужного пакета.

    Например пытался установить по такой команде: opkg install ansible-base, но такого пакета нет.

    У меня назрели вопросы, где я могу найти нужный мне пакет ansible? И решит ли установка данного пакета, исполнение команды ansible-playbook, или нужно еще что-то настраивать и устанавливать?

    Я в этом всем чайник, если написал что-то глупое, не серчайте)

     

     

×
×
  • Create New...