### Manual Podkop Package Installation (Shell) Source: https://podkop.net/docs/install Instructions for manually installing Podkop using pre-compiled .ipk packages. This involves updating the package list, downloading the necessary .ipk files for Podkop and its luci-app, and then installing them using opkg. The order of installation is important. ```shell opkg update opkg install <путь-до-пакета>/podkop_*.ipk opkg install <путь-до-пакета>/luci-app-podkop_*.ipk ``` -------------------------------- ### Start Local Hugo Development Server Source: https://podkop.net/docs/dev/docs This command starts the Hugo development server, allowing you to preview the website locally. The '-D' flag includes draft content. Changes to files will be reflected in real-time. ```bash hugo server -D ``` -------------------------------- ### Install OpenVPN Packages (Terminal) Source: https://podkop.net/docs/tunnels/ovpn_settings Installs the necessary OpenVPN packages, including the OpenSSL version and the LuCI web interface application, using the `opkg` package manager. This command updates the package list and then installs `openvpn-openssl` and `luci-app-openvpn`. ```bash opkg update && opkg install openvpn-openssl luci-app-openvpn ``` -------------------------------- ### Clone Repository with Git Source: https://podkop.net/docs/dev/docs This command clones the repository containing the documentation files to your local machine. Ensure you have Git installed and have forked the repository first. ```bash git clone git@github.com:BLABLA/podkop-wiki.git ``` -------------------------------- ### Automatic Podkop Installation/Update Script (Shell) Source: https://podkop.net/docs/install This script automates the installation and updating of Podkop on OpenWrt routers. It fetches the latest version from a GitHub repository and executes it in the shell. It's designed to work for both new installations and upgrades. ```shell sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/podkop/refs/heads/main/install.sh) ``` -------------------------------- ### Install/Upgrade podkop on OpenWrt Source: https://context7.com/context7/podkop_net/llms.txt Commands to install or upgrade the 'sing-box' package, with options to use force-space if insufficient disk space is available or to install a smaller 'sing-box-tiny' version. Also includes starting the 'podkop' service. ```bash opkg upgrade sing-box --force-space opkg remove sing-box --force-depends opkg install sing-box-tiny service podkop start ``` -------------------------------- ### Start OpenVPN Service (Terminal) Source: https://podkop.net/docs/tunnels/ovpn_settings Starts the OpenVPN service on the router using the system service management command. This command assumes the OpenVPN configuration file is correctly placed and named in the `/etc/openvpn/` directory. ```bash service openvpn start ``` -------------------------------- ### Example OpenVPN Client Configuration Source: https://podkop.net/docs/tunnels/ovpn_settings A sample OpenVPN client configuration file. It includes essential directives for establishing a secure tunnel, such as protocol, cipher, authentication, TLS settings, and remote server details. The file also contains placeholders for CA, certificate, key, and TLS-auth data. ```openvpn client dev tun proto udp resolv-retry infinite nobind persist-key persist-tun cipher AES-256-GCM auth SHA512 verb 3 tls-client tls-version-min 1.2 key-direction 1 remote-cert-tls server dhcp-option DNS 1.1.1.1 dhcp-option DNS 1.0.0.1 remote 51.83.138.160 36784 ... ... ... ... ``` -------------------------------- ### Manual Podkop Installation on OpenWrt (Bash) Source: https://context7.com/context7/podkop_net/llms.txt Provides instructions for manually installing Podkop and its LuCI interface from .ipk package files. This method involves updating the package list, downloading the release packages from GitHub, installing them in sequence, and checking the service status. Requires manual download of 'podkop_*.ipk' and 'luci-app-podkop_*.ipk' files. ```bash # Update package list opkg update # Install packages (replace with actual filenames) opkg install /tmp/podkop_0.5.0_all.ipk opkg install /tmp/luci-app-podkop_0.5.0_all.ipk # Check service status service podkop status ``` -------------------------------- ### Install AmneziaWG Packages with Script (Bash) Source: https://podkop.net/docs/tunnels/awg_settings This script automates the installation of AmneziaWG packages on OpenWRT. It downloads necessary files and prompts the user whether to configure the interface. It's recommended to answer 'N' to the configuration prompt if manual setup is preferred. ```bash sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/refs/heads/master/amneziawg-install.sh) ``` -------------------------------- ### Install OpenConnect Packages (Terminal) Source: https://podkop.net/docs/tunnels/oc_settings Installs the necessary OpenConnect packages, including the LuCI protocol support, using the opkg package manager on OpenWRT. This is the command-line method for preparing the system. ```bash opkg update && opkg install openconnect luci-proto-openconnect ``` -------------------------------- ### AmneziaWG Interface Setup in LuCI (Shell) Source: https://podkop.net/docs/tunnels/awg_settings This command is used to install the AmneziaWG packages manually on an OpenWRT router. It requires pre-downloading the .ipk files. Ensure you install the correct luci package (luci-proto-amneziawg.ipk or luci-app-amneziawg.ipk). ```shell opkg install kmod-amneziawg.ipk amneziawg-tools.ipk luci-proto-amneziawg.ipk ``` -------------------------------- ### AmneziaWG Client Configuration File Source: https://podkop.net/docs/tunnels/awg_settings An example of a client configuration file for AmneziaWG. It includes essential parameters like PrivateKey, Address for the client, and PublicKey, AllowedIPs, and Endpoint for the peer (server). ```ini [Interface] PrivateKey = HNecyq7AWW42URwuINa3bavAPYsasGnbMXzNzLgBT3s= S1 = 0 S2 = 0 Jc = 3 Jmin = 10 Jmax = 50 H1 = 904321824 H2 = 245411986 H3 = 663334667 H4 = 1944657114 Address = 172.16.0.2 [Peer] PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo= AllowedIPs = 0.0.0.0/0 Endpoint = HOST:IP ``` -------------------------------- ### Install Wireguard Packages (Console) Source: https://podkop.net/docs/tunnels/wg_settings Installs the necessary Wireguard tools and LuCI protocol support via the opkg package manager. This is a prerequisite for setting up Wireguard tunnels. ```bash opkg update && opkg install wireguard-tools luci-proto-wireguard ``` -------------------------------- ### OpenWrt LuCI Configuration Example (UCI) Source: https://podkop.net/docs/sections This snippet demonstrates a simplified OpenWrt main configuration file with an extra section for WireGuard (wg). It shows how to define proxy strings, enable community lists, and assign specific lists like 'geoblock' and 'youtube' to different sections. ```uci config main 'main' option proxy_string 'string' option community_lists_enabled '1' list community_lists 'geoblock' config extra 'wg' option mode 'vpn' option interface 'wg0' option community_lists_enabled '1' list community_lists 'youtube' ``` -------------------------------- ### Subnet Configuration Example Source: https://podkop.net/docs/base-settings Shows the format for specifying IP subnets in Podkop's configuration. This is used for blocking or routing traffic based on IP address ranges. ```text 103.21.244.0/22 103.21.244.89 ``` -------------------------------- ### Check sing-box Version Source: https://context7.com/context7/podkop_net/llms.txt A simple command to display the currently installed version of the sing-box proxy application. ```bash sing-box version ``` -------------------------------- ### Troubleshoot DNS after OpenWrt Upgrade (Shell) Source: https://podkop.net/docs/install A sequence of shell commands to address missing DNS resolution after an OpenWrt upgrade when Podkop was not stopped beforehand. It stops Podkop, resets the DNS configuration in dnsmasq to use Google's DNS servers, restarts dnsmasq, synchronizes time, and then restarts Podkop. ```shell service podkop stop ``` -------------------------------- ### Установка необходимых зависимостей сборки в Ubuntu Source: https://podkop.net/docs/dev/package Команды `apt update` и `apt install` устанавливают набор утилит и библиотек, необходимых для сборки пакетов OpenWrt в среде Ubuntu. Включает компиляторы, утилиты для работы с сетью и файлами. ```shell sudo apt update sudo apt install build-essential clang flex bison g++ gawk \ gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev \ python3-distutils rsync unzip zlib1g-dev file wget ``` -------------------------------- ### OpenConnect Configuration File Example Source: https://podkop.net/docs/tunnels/oc_settings Defines the structure for an OpenConnect VPN configuration within the `/etc/config/network` file. It specifies the interface name, protocol, VPN server URI, username, password, and routing behavior. Ensure to replace placeholder variables with actual credentials. ```ini config interface 'oc0' option proto 'openconnect' option uri '$uri' option username '$username' option password '$password' option vpn_protocol 'anyconnect' option defaultroute '0' ``` -------------------------------- ### Manually Install AmneziaWG Packages (Shell) Source: https://podkop.net/docs/tunnels/awg_settings This command installs AmneziaWG packages manually on an OpenWRT router using the 'opkg' package manager. It requires pre-downloading the .ipk files corresponding to the router's architecture. Ensure you install the correct luci package (luci-proto-amneziawg.ipk or luci-app-amneziawg.ipk). ```shell opkg install kmod-amneziawg.ipk amneziawg-tools.ipk luci-proto-amneziawg.ipk (либо luci-app-amneziawg.ipk) ``` -------------------------------- ### Обновление и установка зависимостей пакетов Source: https://podkop.net/docs/dev/package Эти команды используются для обновления списка доступных пакетов (`scripts/feeds update -a`) и установки их (`scripts/feeds install -a`) в вашей среде сборки OpenWrt. Это необходимо перед первой сборкой пакетов, особенно для LuCI. ```shell ./scripts/feeds update -a ./scripts/feeds install -a ``` -------------------------------- ### Stop Podkop Service (Shell) Source: https://podkop.net/docs/install Command to gracefully stop the Podkop service. This should be done before performing system upgrades or making significant configuration changes to prevent potential issues. ```shell service podkop stop ``` -------------------------------- ### Uninstall Getdomains Script (Shell) Source: https://podkop.net/docs/install This shell script is used to uninstall the 'Getdomains' application, which is incompatible with Podkop. It removes the application while preserving tunnels, zones, forwarding, stubby, and dnscrypt. The sing-box configuration will be overwritten by Podkop. ```shell sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/domain-routing-openwrt/refs/heads/master/getdomains-uninstall.sh) ``` -------------------------------- ### JSON Domain List Configuration Source: https://podkop.net/docs/base-settings An example of a JSON structure used for defining domain lists in Podkop's configuration. This format allows for specifying domain suffixes and other relevant rules for network traffic filtering. ```json { "version":3, "rules": [ { "domain_suffix": [ "sub.example.com", "example.com" ] } ] } ``` -------------------------------- ### Remove Podkop Application (Shell) Source: https://podkop.net/docs/install Command to completely remove the Podkop application, including its luci-i18n, luci-app, and core package. This ensures all components of Podkop are uninstalled from the system. ```shell opkg remove luci-i18n-podkop-ru luci-app-podkop podkop ``` -------------------------------- ### Example Wireguard Client Configuration File Source: https://podkop.net/docs/tunnels/wg_settings A typical Wireguard client configuration file, showing the structure for [Interface] and [Peer] sections. This file contains essential parameters like private key, address, public key, preshared key, endpoint, and allowed IPs. ```ini [Interface] PrivateKey = SMJ1k2xXcqQOzuGmbLRZiJdilhpPyW7002FlDmzJoms= Address = 10.0.0.3/32 [Peer] PublicKey = R2NAFxYRL7T5POMOmNMemaU1MEKUZEvVYAeeHvLryyU= PresharedKey = hfrTs4UAoK/SaOBbjajO87DBfEMonVrAAxYiJnnwgKg= Endpoint = HOST:IP AllowedIPs = 0.0.0.0/0 ``` -------------------------------- ### Remove https-dns-proxy and related packages (Shell) Source: https://podkop.net/docs/install This command removes the 'https-dns-proxy' package and its associated luci-app and internationalization files. This is necessary to resolve conflicts with Podkop, as 'https-dns-proxy' also modifies the '/etc/config/dhcp' configuration. ```shell opkg remove --force-depends luci-app-https-dns-proxy https-dns-proxy luci-i18n-https-dns-proxy* ``` -------------------------------- ### Run Global Check Command Source: https://podkop.net/docs/diagnostics Executes the global check command for Podkop diagnostics from the command line. This is useful when the LuCI interface is unavailable or not in use. It helps in gathering comprehensive diagnostic information. ```bash /usr/bin/podkop global_check ``` -------------------------------- ### Rollback podkop to a Previous Version Source: https://context7.com/context7/podkop_net/llms.txt Instructions for rolling back to an older version of podkop. This involves stopping the current service, removing existing packages, installing the desired .ipk files from a local path, and then restarting the service. ```bash # Download .ipk files of the desired release from GitHub # Example: version 0.4.11 for OpenWrt 23.05 # Remove current version service podkop stop opkg remove luci-app-podkop podkop # Install old version opkg install /tmp/podkop_0.4.11_all.ipk opkg install /tmp/luci-app-podkop_0.4.11_all.ipk service podkop start ``` -------------------------------- ### Verify Traffic Through sing-box (Linux/macOS) Source: https://podkop.net/docs/troubleshooting This command sends an HTTP GET request to 'fakeip.podkop.fyi/check' to verify that traffic is correctly routed through the sing-box service and returns a JSON response indicating successful routing. It helps identify issues where traffic is not reaching the sing-box or is being misconfigured by nftables. ```bash curl -v https://fakeip.podkop.fyi/check ``` -------------------------------- ### Restart OpenVPN Service Source: https://podkop.net/docs/tunnels/ovpn_settings This command restarts the OpenVPN service, applying any configuration changes made. It can be executed via the command line or through the LuCI web interface under System > Startup. Restarting ensures that new routing rules or filter settings are activated. ```bash service openvpn restart ``` -------------------------------- ### Transfer OpenVPN Config (SCP) Source: https://podkop.net/docs/tunnels/ovpn_settings Copies the OpenVPN client configuration file from the local machine to the router's OpenVPN configuration directory using the Secure Copy Protocol (SCP). The `.ovpn` file is renamed to `.conf` to be recognized by OpenVPN. ```bash scp client.ovpn root@192.168.1.1:/etc/openvpn/client.conf ``` -------------------------------- ### Generate Public Key with amneziawg CLI Source: https://podkop.net/docs/tunnels/awg_settings This command generates a public key from a provided private key using the amneziawg command-line tool. It's a utility for key management within the AmneziaWG setup. ```bash echo 'SMJ1k2xXcqQOzuGmbLRZiJdilhpPyW7002FlDmzJoms=' | amneziawg pubkey ``` -------------------------------- ### Configure UDP DNS Server for Podkop Source: https://context7.com/context7/podkop_net/llms.txt Sets the DNS protocol to UDP and specifies Google's public DNS server (8.8.8.8) for Podkop. This configuration is then committed and the Podkop service is restarted. It's a basic setup for DNS resolution. ```bash uci set podkop.main.dns_protocol='udp' uci set podkop.main.dns_server='8.8.8.8' uci commit podkop service podkop restart # Проверка DNS nslookup google.com 127.0.0.42 ``` -------------------------------- ### Check Network Interfaces (Linux) Source: https://podkop.net/docs/tunnels/ovpn_settings Displays network interface information, specifically looking for the `tun0` interface created by OpenVPN. This command helps verify if the VPN tunnel has been successfully established and shows its IP address details. ```bash root@OpenWrt:~# ip a | grep tun0 89: tun0: mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500 inet 10.8.0.6 peer 10.8.0.5/32 scope global tun0 ``` -------------------------------- ### Configure Multiple Routing Sections in Podkop Source: https://context7.com/context7/podkop_net/llms.txt Sets up multiple distinct routing sections (or profiles) within Podkop, each with its own mode and associated community lists. This example demonstrates creating sections for geoblock (proxy mode), YouTube (VPN mode), and Google AI (proxy mode), each targeting specific traffic. Changes are committed and the service restarted. It also includes a command to verify the outbound configuration. ```bash # Основная секция: VLESS для geoblock ``` ```bash uci set podkop.main.mode='proxy' uci set podkop.main.proxy_string='vless://uuid@eu-server.com:443?....' ``` ```bash uci set podkop.main.community_lists_enabled='1' ``` ```bash uci add_list podkop.main.community_lists='geoblock' ``` ```bash # Дополнительная секция: WireGuard для YouTube ``` ```bash uci set podkop.youtube_wg=extra ``` ```bash uci set podkop.youtube_wg.mode='vpn' ``` ```bash uci set podkop.youtube_wg.interface='wg0' ``` ```bash uci set podkop.youtube_wg.community_lists_enabled='1' ``` ```bash uci add_list podkop.youtube_wg.community_lists='youtube' ``` ```bash # Ещё одна секция: Shadowsocks для Google AI ``` ```bash uci set podkop.google_ai=extra ``` ```bash uci set podkop.google_ai.mode='proxy' ``` ```bash uci set podkop.google_ai.proxy_string='ss://base64@us-server.com:8388' ``` ```bash uci set podkop.google_ai.community_lists_enabled='1' ``` ```bash uci add_list podkop.google_ai.community_lists='google_ai' ``` ```bash uci commit podkop service podkop restart # Проверить конфигурацию outbounds cat /etc/sing-box/config.json | jq '.outbounds[] | {tag, type}' ``` -------------------------------- ### Ping Test via VPN Interface Source: https://podkop.net/docs/tunnels/ovpn_settings Performs a ping test to a specified host (`itdog.info`) using the `tun0` interface. This is a crucial step to confirm that the OpenVPN tunnel is active and routing traffic correctly. ```bash ping -I tun0 itdog.info ``` -------------------------------- ### Verify awg0 Interface Status in OpenWRT Source: https://podkop.net/docs/tunnels/awg_settings This command checks the network interfaces on an OpenWRT system and filters for the 'awg0' interface to confirm its status and assigned IP address after configuration. ```bash root@OpenWrt:~# ip a | grep awg0 770: awg0: mtu 1280 qdisc noqueue state UNKNOWN group default qlen 1000 inet 172.16.0.2/32 brd 255.255.255.255 scope global awg0 ``` -------------------------------- ### Ping Test via AmneziaWG Interface Source: https://podkop.net/docs/tunnels/awg_settings This command performs a ping test to a specified host ('itdog.info') using the AmneziaWG interface ('awg0'). This is useful for verifying that the tunnel is operational and routing traffic correctly. ```shell ping -I awg0 itdog.info ``` -------------------------------- ### Enable Mixed Mode (SOCKS Proxy) in Podkop Source: https://context7.com/context7/podkop_net/llms.txt Activates a mixed mode in Podkop, enabling a SOCKS proxy on the router. This allows applications to route their traffic through the proxy. The port is configurable, and setup instructions for browsers/applications are provided. ```bash # Поднять SOCKS прокси на роутере для приложений uci set podkop.main.mixed_enabled='1' uci set podkop.main.mixed_port='1080' uci commit podkop service podkop restart # Настроить браузер или приложение на использование прокси: # SOCKS5: 192.168.1.1:1080 # HTTP: 192.168.1.1:1080 ``` -------------------------------- ### Enable YACD Monitoring Panel in Podkop Source: https://context7.com/context7/podkop_net/llms.txt Enables the YACD (Yet Another Connectivity Dashboard) web panel for monitoring Podkop connections. After enabling, the panel can be accessed via a web browser at a specified address and port. Instructions are provided for initial setup and usage. ```bash # Включить Yacd для мониторинга соединений uci set podkop.main.yacd_enabled='1' μαζί commit podkop service podkop restart # Открыть в браузере: http://192.168.1.1:9090/ui # В поле API Base URL ввести: 192.168.1.1:9090 # Secret оставить пустым, нажать Add и выбрать адрес # В разделе Conns можно увидеть активные соединения # В разделе Proxies — переключить прокси вручную (для URLTest) ``` -------------------------------- ### Change Source Network Interface in Podkop Source: https://context7.com/context7/podkop_net/llms.txt Allows specifying the source network interface for Podkop traffic, useful for non-standard network setups. Multiple interfaces can be added to the list. The configuration is committed and the service restarted. ```bash # Для нестандартной топологии (не br-lan) uci set podkop.main.source_interface='br-guest' μαζί commit podkop service podkop restart # Добавить несколько интерфейсов uci add_list podkop.main.source_interface='br-lan' μαζί_list podkop.main.source_interface='wg0' μαζί commit podkop service podkop restart ``` -------------------------------- ### Verify Traffic Routing with Traceroute Source: https://podkop.net/docs/tunnels/ovpn_settings This snippet shows how to use the `traceroute` command to check if traffic is being routed through the OpenVPN tunnel. By examining the first hop in the traceroute output, you can determine if the traffic is going through your router's IP or an unfamiliar IP, indicating tunnel usage. This helps in diagnosing routing issues. ```bash root@OpenWrt:~# traceroute itdog.info traceroute to itdog.info (95.217.5.75), 30 hops max, 46 byte packets 1 10.12.0.1 (10.4.0.1) 67.590 ms 66.855 ms 67.474 ms 2 172.31.1.1 (172.31.1.1) 71.196 ms 70.921 ms 70.797 ms ``` -------------------------------- ### Configure AmneziaWG Interface via UCI Source: https://podkop.net/docs/tunnels/awg_settings This snippet shows how to configure an AmneziaWG interface using UCI commands. It involves setting various parameters such as private key, listen port, IP addresses, and peer details. Ensure you replace placeholder values like '$PRIVATE_KEY' with your actual values. This configuration is for the network interface. ```shell uci set network.awg0="interface" uci set network.awg0.proto="amneziawg" uci set network.awg0.private_key="$PRIVATE_KEY" uci set network.awg0.listen_port="51820" add_list network.awg0.addresses="$AWG_IP" uci set network.awg0.awg_jc=$JC uci set network.awg0.awg_jmin=$JMIN uci set network.awg0.awg_jmax=$JMAX uci set network.awg0.awg_s1=$S1 uci set network.awg0.awg_s2=$S2 uci set network.awg0.awg_h1=$H1 uci set network.awg0.awg_h2=$H2 uci set network.awg0.awg_h3=$H3 uci set network.awg0.awg_h4=$H4 network.peer="amneziawg_awg0" uci set network.peer.public_key="$PUBLIC_KEY" uci set network.peer.endpoint_host="$HOST" uci set network.peer.endpoint_port="$IP" uci set network.peer.route_allowed_ips="0" uci set network.peer.persistent_keepalive="25" uci set network.peer.allowed_ips="0.0.0.0/0" ``` -------------------------------- ### Compiling Rule Sets with sing-box Source: https://podkop.net/docs/base-settings Demonstrates how to compile rule sets into the .srs format using the sing-box command-line tool. This is useful for creating optimized, non-human-readable rule set files for network traffic management. ```bash sing-box rule-set compile [--output .srs] .json ``` -------------------------------- ### Configure Basic WireGuard Interface (UCI/Bash) Source: https://context7.com/context7/podkop_net/llms.txt Demonstrates how to create and configure a basic WireGuard VPN interface using UCI commands on OpenWrt. This includes setting up the interface, private key, listen port, IP addresses, and adding a peer with its public key, endpoint, and allowed IPs. After committing, the interface is brought up, and connectivity can be tested. ```bash # Create WireGuard interface user@router:~# uci set network.wg0=interface user@router:~# uci set network.wg0.proto='wireguard' user@router:~# uci set network.wg0.private_key='YOUR_PRIVATE_KEY' user@router:~# uci set network.wg0.listen_port='51820' user@router:~# uci add_list network.wg0.addresses='10.0.0.2/24' # Add peer user@router:~# uci add network wireguard_wg0 user@router:~# uci set network.@wireguard_wg0[-1].public_key='SERVER_PUBLIC_KEY' user@router:~# uci set network.@wireguard_wg0[-1].endpoint_host='vpn.example.com' user@router:~# uci set network.@wireguard_wg0[-1].endpoint_port='51820' user@router:~# uci add_list network.@wireguard_wg0[-1].allowed_ips='0.0.0.0/0' user@router:~# uci set network.@wireguard_wg0[-1].persistent_keepalive='25' # Commit and bring up interface user@router:~# uci commit network user@router:~# ifup wg0 # Test connection ping -I wg0 -c 3 8.8.8.8 curl --interface wg0 ifconfig.me ``` -------------------------------- ### Get Router Architecture (Shell) Source: https://podkop.net/docs/tunnels/awg_settings This command retrieves the processor architecture of your OpenWRT router. The output, such as 'aarch64_cortex-a53', is crucial for downloading the correct AmneziaWG package files. ```shell opkg print-architecture ``` -------------------------------- ### Text File Domain List Format Source: https://podkop.net/docs/base-settings Illustrates the format for simple text-based domain lists. Each domain is listed on a new line, and comments can be added using '//'. This format is easily readable and editable. ```text example.com sub.example.com ``` -------------------------------- ### Сборка пакета LuCI Source: https://podkop.net/docs/dev/package Аналогично сборке обычного пакета, эта команда компилирует пакет LuCI. Используется `make package/luci-app-podkop/{clean,compile} V=s` для очистки и сборки. Флаг `V=s` предоставляет детальный вывод. ```shell make package/luci-app-podkop/{clean,compile} V=s ``` -------------------------------- ### Создание директории для пакета Source: https://podkop.net/docs/dev/package Команда `mkdir` используется для создания новой директории, которая будет служить контейнером для вашего пакета. Эта директория обычно находится внутри структуры проекта OpenWrt. ```shell mkdir package/utilites ``` -------------------------------- ### Basic Diagnostics via Podkop Web Interface (LuCI) Source: https://context7.com/context7/podkop_net/llms.txt Describes how to perform basic diagnostics for Podkop using the LuCI web interface. It lists the key checks available in the Diagnostics tab, including Podkop and Sing-box status, FakeIP functionality, DNS resolution, and configuration validity. ```markdown # Открыть LuCI → Services → Podkop → вкладка Diagnostics # # Проверяемые пункты: # ✔ Podkop Status: Autostart enabled # ✔ Sing-box Status: running # ✔ FakeIP Status on router: works on router # ✔ FakeIP Status in browser: works in browser # ✔ DNS Status: работает выбранный DNS # ✔ Config: working (разные IP для провайдера и туннеля) # # Если что-то красное — читать рекомендации по каждому пункту ``` -------------------------------- ### Генерация шаблона перевода (.pot) Source: https://podkop.net/docs/dev/package Перейдите в директорию `luci-app-podkop` и запустите скрипт `./xgettext.sh`. Этот скрипт сканирует код на наличие строк, обернутых в функцию `_()`, и генерирует файл `podkop.pot` в папке `po/templates/`, который служит шаблоном для локализации. ```shell cd luci-app-podkop ./xgettext.sh ``` -------------------------------- ### Configure VLESS Proxy via URL String (UCI/Bash) Source: https://context7.com/context7/podkop_net/llms.txt Sets up Podkop to use a VLESS proxy connection using a provided URL string. This can be done via the LuCI web interface or the command line using UCI commands. After applying the configuration, the Podkop service needs to be restarted. The command also shows how to verify the outbound configuration using `jq`. ```bash # Set mode and proxy string user@router:~# uci set podkop.main.mode='proxy' user@router:~# uci set podkop.main.proxy_string='vless://a1b2c3d4-1234-5678-90ab-1234567890ab@example.com:443?type=tcp&security=tls&sni=example.com' user@router:~# uci commit podkop user@router:~# service podkop restart # Verify configuration cat /etc/sing-box/config.json | jq '.outbounds[] | select(.tag=="main-out")' ``` -------------------------------- ### Скачивание и распаковка SDK OpenWrt Source: https://podkop.net/docs/dev/package Этот блок команд демонстрирует, как скачать SDK OpenWrt с помощью `wget` и распаковать его, а затем переименовать директорию для удобства. Требуется наличие `wget` и `tar`. ```shell wget https://downloads.openwrt.org/releases/24.10.2/targets/x86/64/openwrt-sdk-24.10.2-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst tar xf openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz mv openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64 SDK ``` -------------------------------- ### Сборка всех пакетов одновременно Source: https://podkop.net/docs/dev/package Эта команда позволяет выполнить очистку и компиляцию нескольких пакетов (в данном случае `luci-app-podkop` и `podkop`) за один вызов `make`. Это удобно для одновременного обновления связанных пакетов. ```shell make package/luci-app-podkop/{clean,compile} package/podkop/{clean,compile} V=s ``` -------------------------------- ### Configure Preshared Key for AmneziaWG Peer Source: https://podkop.net/docs/tunnels/awg_settings This snippet demonstrates how to set a preshared key for an AmneziaWG peer configuration using UCI. This is an optional step, used when a preshared key is required for the connection. ```shell uci set network.peer.preshared_key="$PRESHARED_KEY" ``` -------------------------------- ### OpenWRT AmneziaWG Network Configuration Source: https://podkop.net/docs/tunnels/awg_settings This configuration block defines the AmneziaWG interface and peer settings within the OpenWRT network configuration file. It specifies parameters for obfuscation, connection details, and routing. ```uci # Отвечает за Interface config interface 'awg0' option proto 'amneziawg' option listen_port '51820' option private_key '$PRIVATE_KEY' list addresses '$AWG_IP' option awg_s1 '$S1' option awg_s2 '$S2' option awg_jc '$Jc' option awg_jmin '$Jmin' option awg_jmax '$Jmax' option awg_h1 '$H1' option awg_h2 '$H2' option awg_h3 '$H3' option awg_h4 '$H4' # Отвечает за Peer config amneziawg_awg0 option name 'awg0_client' option route_allowed_ips '0' option persistent_keepalive '25' list allowed_ips '0.0.0.0/0' option endpoint_host '$HOST' option endpoint_port '51820' option public_key '$PUBLIC_KEY' option preshared_key '$PRESHARED_KEY' ``` -------------------------------- ### Сборка пакета OpenWrt Source: https://podkop.net/docs/dev/package Команда `make package/<имя_пакета>/{clean,compile} V=s` используется для очистки и последующей компиляции указанного пакета. Флаг `V=s` выводит подробную информацию о процессе компиляции. Опционально можно добавить флаг `-j N` для параллельной сборки. ```shell make package/podkop/{clean,compile} V=s ``` -------------------------------- ### Создание символических ссылок на пакеты Source: https://podkop.net/docs/dev/package Символические ссылки (`ln -s`) используются для указания на директории с исходным кодом ваших пакетов (`podkop` и `luci-app-podkop`) из вашего основного репозитория в структуру пакетов OpenWrt. ```shell ln -s ~/podkop/podkop package/utilites/podkop ln -s ~/podkop/luci-app-podkop package/luci-app-podkop ``` -------------------------------- ### Backup and Restore podkop Configuration Source: https://context7.com/context7/podkop_net/llms.txt Shell commands to export and import podkop's UCI configuration and back up the 'sing-box' configuration file. Restoring involves importing the UCI configuration, committing changes, and restarting the service. ```bash # Save configuration графииuci export podkop > /tmp/podkop_backup.txt cp /etc/sing-box/config.json /tmp/sing-box_backup.json # Restore configuration графииuci import podkop < /tmp/podkop_backup.txt графииuci commit podkop service podkop restart ``` -------------------------------- ### OpenVPN IPv6 Error Log Snippet Source: https://podkop.net/docs/tunnels/ovpn_settings A snippet of OpenVPN log messages indicating a fatal error related to IPv6 configuration on the `tun0` interface. This often occurs if IPv6 is disabled on the router but present in the client configuration. ```log Mon Jun 2 16:40:47 2025 daemon.notice openvpn(client)[28313]: net_addr_v6_add: fd15:53b6:dead::2/64 dev tun0 Mon Jun 2 16:40:47 2025 daemon.warn openvpn(client)[28313]: sitnl_send: rtnl: generic error (-13): Permission denied Mon Jun 2 16:40:47 2025 daemon.err openvpn(client)[28313]: Linux can't add IPv6 to interface tun0 Mon Jun 2 16:40:47 2025 daemon.notice openvpn(client)[28313]: Exiting due to fatal error ``` -------------------------------- ### Run Full Diagnostic Check (Bash) Source: https://context7.com/context7/podkop_net/llms.txt Executes a comprehensive diagnostic check for Podkop services, configuration, and network status. The output includes service status, DNS configuration, FakeIP check, tunnel status, nftables rules, network interfaces, and package versions. ```bash /usr/bin/podkop global_check ``` -------------------------------- ### JSON Rule Set Structure for Subnets Source: https://podkop.net/docs/base-settings A sample JSON structure for defining rules, specifically for IP CIDRs. This format is human-readable and can be compiled into binary formats like SRS. It includes versioning and a list of rules, each containing IP CIDR specifications. ```json { "version":3, "rules": [ { "ip_cidr": [ "10.0.0.0/24", "192.168.0.1" ] } ] } ``` -------------------------------- ### Обновление файла перевода (.po) для локали Source: https://podkop.net/docs/dev/package Команда `./msgmerge.sh <код_локали>` (например, `ru`) используется в директории `luci-app-podkop` для создания или обновления файла перевода `.po` для указанной локали. Файлы `.po` находятся в папке `po/<код_локали>/`. ```shell cd luci-app-podkop ./msgmerge.sh ru ``` -------------------------------- ### Update sing-box (Bash) Source: https://context7.com/context7/podkop_net/llms.txt Instructions for updating the sing-box binary, a dependency for Podkop. It's recommended to stop Podkop before updating sing-box to ensure a smooth process. ```bash # Stop podkop for safe dependency update service podkop stop # Update sing-box opkg update opkg upgrade sing-box ``` -------------------------------- ### Test Proxy Configuration (Bash) Source: https://context7.com/context7/podkop_net/llms.txt Tests the Podkop proxy configuration using Community Sub links. It involves updating the proxy string in Podkop settings, restarting the service, inspecting the sing-box outbound configuration, and performing a connection test. ```bash # Testing with Community Sub links # Get a test link from the Podkop web interface uci set podkop.main.proxy_string='vless://test-link' uci commit podkop service podkop restart # Check sing-box outbound cat /etc/sing-box/config.json | jq '.outbounds[] | select(.tag=="main-out")' # Check connection curl -v https://fakeip.podkop.fyi/check # If the test link works but your own doesn't: # - there's an issue with your link or server # - try exporting the configuration from NekoBox ``` -------------------------------- ### Check nftables Rules (Bash) Source: https://context7.com/context7/podkop_net/llms.txt Inspects nftables ruleset for Podkop. It focuses on displaying rules with packet counters, checking the 'mangle' and 'proxy' chains, and identifying potential conflicts with other rules. ```bash # Show all Podkop rules with packet counters ft list ruleset | grep -B3 mark # Check the mangle chain (should have non-zero counters) ft list chain inet singbox mangle # Check the proxy chain ft list chain inet singbox proxy # If counters are zero: # - traffic is not reaching the router # - problem with DNS or gateway on the client # Check for conflicting rules ft list ruleset | grep -E "mark|tproxy" # There should be no rules from other packages (getdomains, vpn-client) ``` -------------------------------- ### Configure Podkop File Storage Paths Source: https://context7.com/context7/podkop_net/llms.txt Allows customization of file storage paths for Podkop. Users can change the location of the sing-box configuration file and the cache/lists directory to manage flash memory usage or use external storage like USB drives. ```bash # По умолчанию: # - конфиг sing-box: /etc/sing-box/config.json (Flash) # - кэш и списки: /tmp/podkop_cache/ (RAM) # Переместить конфиг в RAM (для устройств с малым Flash) uci set podkop.main.config_path='/tmp/sing-box-config.json' # Переместить кэш на Flash или USB (на свой риск) uci set podkop.main.cache_path='/opt/podkop_cache/' mkdir -p /opt/podkop_cache/ μαζί commit podkop service podkop restart ``` -------------------------------- ### Check Routing Table for Tunnel Redirection Source: https://podkop.net/docs/tunnels/ovpn_settings This command displays the routing table to verify if all traffic is being redirected to the OpenVPN tunnel. A line like `0.0.0.0/1 via dev tun0` indicates that all network traffic is routed through the specified tunnel interface. An absence or different pattern suggests traffic is not fully tunneled. ```bash root@OpenWrt:~# ip r 0.0.0.0/1 via 10.8.0.1 dev tun0 ```