Whitelist Bypass

repository·main·Indexed 23 days ago

https://github.com/kulikov0/whitelist-bypass

A tool to circumvent government-imposed whitelist censorship by tunneling internet traffic through video calling platforms such as VK Call, Yandex Telemost, WB Stream, and DION. It supports two primary tunnel modes: DC (DataChannel) using Pion for SCTP traffic and Video mode using VP8 video tracks. The project provides an Electron desktop app for creators, client apps for Android and iOS, headless Go binaries for Linux, and a VK bot for automated session management.

Tokens
25.1K
Snippets
41
Records
119
Agent score
81%

What's inside whitelist-bypass

  1. Core Concept: Creator and Joiner Relationship

    main

    The system operates using a Creator and a Joiner model to bypass network restrictions:

    • Creator: Runs on the side with free internet (Desktop or Headless server). It establishes the connection to the service (VK, Telemost, etc.).
    • Joiner: Runs on the side with censorship (Android, iOS, Linux). It connects to the Creator to access the service.

    Critical Constraint: One-to-One Mapping

    One Creator session = exactly one Joiner.

    A single Creator session (one desktop tab or one headless process) can only serve one Joiner. Attempting to connect multiple Joiners to the same link will break the tunnel. You must launch a separate Creator instance with its own unique link for every device you wish to connect.

  2. Configure VP8 pacing for Joiners

    main

    VP8 pacing controls how frequently the joiner sends VP8 frames through the SFU. This is configured on the joiner; the creator automatically adjusts to the values sent by the joiner at the start of the session.

    Note: Obfuscation and VP8 pacing only work in headless-headless mode (both creator and joiner must be in headless mode).

    • Override VP8 pacing: When enabled, you can set the following:
      • FPS: Nominal VP8 frame rate (Range: 1..240, typically 24-30).
      • Batch: Tick density multiplier. Real sending speed $\approx$ fps \times batch frames/sec (Range: 1..256).

    Throughput Calculation: Throughput \approx fps \times batch \times 1126 bytes/frame.

    fpsbatchthroughput (approx)
    241~27 KB/s
    248~216 KB/s
    2430~810 KB/s (≈6.5 Mbps)

    Warning: Higher batch values increase CPU load on the phone and the SFU. If you see packet drops or connection instability in the logs, decrease the batch value.

  3. How Whitelist Bypass works

    main

    Whitelist Bypass tunnels internet traffic through video calling platforms (VK Call, Yandex Telemost, WB Stream) to bypass government whitelist censorship. It uses two primary tunnel modes:

    1. DC (DataChannel) mode: Uses Pion to open an SCTP DataChannel on the publisher, tunneling TCP/UDP traffic through it. Frames pass through the platform's SFU as standard DataChannel payloads.
    2. Video mode: The tunnel rides on a published VP8 video track instead of a DataChannel. This is useful when the SFU rate-limits DataChannels but allows RTP traffic (e.g., Telemost), or when the platform requires a video track (e.g., WB Stream).

    The recommended architecture is headless on both ends (using pure Go/Pion to talk directly to the SFU) to enable features like ChaCha20 obfuscation and configurable VP8 pacing. A legacy browser-based path exists for VK DC but is being phased out as it is slower and lacks obfuscation.

  4. Prepare Cookies for Headless Creator

    main

    To run a Headless Creator on a server without a GUI, you must export authentication cookies from the Desktop Creator.

    1. Open the Desktop Creator and authenticate on the desired platforms (VK, Yandex, WBStream, DION).
    2. Click Export Cookies.
    3. This generates a cookies.zip containing:
      • cookies-vk.json
      • cookies-yandex.json
      • cookies-wbstream.json
      • cookies-dion.json
    4. Unzip and copy the required JSON files to your server.
  5. Setup the Headless VK Bot (Server)

    main

    The headless-vk-bot is a standalone Go binary that acts as a server-side version of the desktop Creator. It listens to VK Community Long Poll events and, upon receiving a command, launches the appropriate headless-creator to generate a join link. This is ideal for VPS deployment.

    Prerequisites

    1. VK Community: Create a VK community and obtain a community access token, group ID, and your VK ID.
    2. Binaries: Download the following binaries from GitHub Releases and place them in a single directory (e.g., /usr/local/bin/):
      • headless-vk-bot-linux-x64
      • headless-vk-creator-linux-x64
      • headless-telemost-creator-linux-x64
      • headless-wbstream-creator-linux-x64
      • headless-dion-creator-linux-x64 Note: Ensure they are executable: chmod +x /usr/local/bin/headless-*.
    3. Cookies: You must provide logged-in session cookies for all four platforms. In the desktop Creator, click Export Cookies to get a cookies.zip containing:
      • cookies-vk.json
      • cookies-yandex.json (for Telemost)
      • cookies-wbstream.json
      • cookies-dion.json Unzip these and move them to your server.
    chmod +x /usr/local/bin/headless-*
  6. Enable Autostart for Creator via Systemd

    main

    To ensure the Creator starts automatically when the VPS reboots, create a Systemd service.

    1. Create the service file:
    sudo tee /etc/systemd/system/whitelist-bypass-start.service > /dev/null << 'EOF'
    [Unit]
    Description=Whitelist Bypass Creator Service
    Documentation=https://github.com/kulikov0/whitelist-bypass/
    After=xpra-server.service
    
    [Service]
    Type=simple
    ExecStart=bash /usr/bin/whitelist-bypass-start
    
    [Install]
    WantedBy=multi-user.target
    EOF
    1. Enable and start the service:
    sudo systemctl daemon-reload
    sudo systemctl enable whitelist-bypass-start.service
    sudo systemctl start whitelist-bypass-start.service
    sudo tee /etc/systemd/system/whitelist-bypass-start.service > /dev/null << 'EOF'
    [Unit]
    Description=Whitelist Bypass Creator Service
    Documentation=https://github.com/kulikov0/whitelist-bypass/
    After=xpra-server.service
    
    [Service]
    Type=simple
    ExecStart=bash /usr/bin/whitelist-bypass-start
    
    [Install]
    WantedBy=multi-user.target
    EOF
    
    sudo systemctl daemon-reload
    sudo systemctl enable whitelist-bypass-start.service
    sudo systemctl start whitelist-bypass-start.service
  7. Configure the VK Bot for Whitelist Bypass

    main

    The VK Bot allows you to initiate calls via VKontakte messages without direct access to the Creator. To set it up, you must create a VK community and configure its API permissions.

    Setup Steps

    1. Create a VK Community: You can use a private community.
    2. Enable API Access:
      • Go to Management -> Additional -> Work with API -> Create key.
      • Select all permission checkboxes.
      • Confirm via SMS and copy the generated token.
    3. Enable Long Poll API:
      • Go to Long Poll API -> Event Types.
      • Under Messages, select all checkboxes.
    4. Enable Bot Capabilities:
      • Go to Messages -> Bot Settings and enable Bot Capabilities.
    5. Identify IDs:
      • Community ID: Copy the numeric ID of your community (exclude the club prefix).
      • User IDs: Find your VK ID via Profile -> Manage VK ID -> My Data. To allow multiple users, list IDs separated by commas (e.g., 12345,67890).
    6. Configure Creator:
      • In the Creator application, enter the Token, Group ID, and User IDs (comma-separated).
      • Save and enable the bot. The bot will ignore commands from any user not included in the User IDs list.
  8. Use VK Bot commands

    main

    Once the VK Bot is configured, you can control calls and tabs via VK messages using specific commands.

    Headless Mode Commands

    These commands initiate calls in headless mode:

    • /vk headless - Initiates a VK call in headless mode.
    • /tm headless - Initiates a Telemost call in headless mode.
    • /wb headless - Joins a WB Stream room.

    Management Commands

    • /list - Displays a list of currently active tabs.
    • /close <id> - Closes a specific tab using its ID.

    Legacy Commands (Deprecated)

    Note: These browser-based paths are being phased out.

    • /vk dc - VK call in DC mode.
    • /vk video - VK call in Video mode.
    • /tm video - Telemost call in Video mode.
    /vk headless
    /tm headless
    /wb headless
    /list
    /close <id>
  9. Set up the Joiner on Desktop (Windows, macOS, Linux)

    main

    The Desktop Joiner is a GUI application supporting VK, Telemost, and WB Stream. It can create a system-wide VPN tunnel (TUN) or run as a local SOCKS5 proxy.

    Installation: Download the appropriate version from GitHub Releases:

    • Windows: .exe (portable)
    • Linux: .AppImage
    • macOS: .dmg

    Running with System VPN (TUN mode):

    1. Paste the call link (supports wbstream://, https://stream.wb.ru/..., https://telemost.yandex.ru/j/..., or VK links).
    2. Configure optional settings (Name, SOCKS5 host/port, Tunnel mode, VP8, DNS).
    3. Ensure SOCKS5 only is unchecked (default). This requires root/admin privileges.
    4. Click Start and wait for TUNNEL CONNECTED.

    Running as SOCKS5 Proxy only:

    • Check the SOCKS5 only box. This does not require root/admin privileges and behaves like the iOS version.

    Platform-specific Privileges for TUN mode:

    • Windows: Requires Administrator (UAC prompt will appear).
    • Linux: Requires root. Run: xhost +SI:localuser:root then sudo -E ./WhitelistBypass\' Joiner-*.AppImage --no-sandbox.
    • macOS: Requires root. Run: sudo "/Applications/WhitelistBypass Joiner.app/Contents/MacOS/WhitelistBypass Joiner".

    VK Users: The desktop GUI will automatically open a window for VK Captcha solving.

  10. Deploy headless-vk-bot as a systemd service

    main

    To run the bot as a persistent background service on Linux, create a systemd unit file at /etc/systemd/system/wlb-vk-bot.service.

    ```ini
    [Unit]
    Description=Headless VK bot (whitelist-bypass)
    After=network-online.target
    
    [Service]
    Type=simple
    ExecStart=/usr/local/bin/headless-vk-bot \
      --token <community_access_token> \
      --group-id <community_id> \
      --user-id <vk_id_1>,<vk_id_2> \
      --bins-dir /usr/local/bin \
      --vk-cookies /etc/whitelist-bypass/cookies-vk.json \
      --tm-cookies /etc/whitelist-bypass/cookies-yandex.json \
      --wb-cookies /etc/whitelist-bypass/cookies-wbstream.json \
      --dion-cookies /etc/whitelist-bypass/cookies-dion.json
    Restart=always
    RestartSec=5
    User=wlb
    
    [Install]
    WantedBy=multi-user.target

    Activation commands:

    sudo systemctl daemon-reload
    sudo systemctl enable --now wlb-vk-bot
    sudo journalctl -u wlb-vk-bot -f

    Note: When the service stops, it sends SIGTERM to all running creator processes to ensure sessions are closed properly.

  11. Set up the Joiner on Android

    main

    To use the Whitelist Bypass tunnel on Android:

    1. Install whitelist-bypass.apk.
    2. Allow the VPN connection in the system dialog upon first launch.
    3. Open settings (button to the right of GO) and select a tunnel mode: DC or Video. The headless-creator will automatically adjust to this mode.
    4. Paste the call link into the input field.
    5. Press GO.
    6. Wait for the "Tunnel active" status. All device traffic is now routed through the call.

    Troubleshooting: If it doesn't work, try changing the DNS settings to Custom (default is 8.8.8.8 / 8.8.4.4) and ensure Android's system settings have Private DNS set to "Automatic".

  12. Set up the Joiner on iOS

    main

    iOS only supports SOCKS5 proxy mode (no system VPN). To proxy all device traffic, you must use a third-party VPN app that supports SOCKS5 (e.g., Happ, Shadowrocket, or Streisand).

    1. Install whitelist-bypass-proxy.ipa (unsigned) from GitHub Releases.
    2. Install a SOCKS5-compatible VPN app.
    3. Open whitelist-bypass, select a tunnel mode (DC or Video), paste the call link, and press Go.
    4. Wait for "Tunnel Active". The app will display the SOCKS5 proxy address (e.g., socks5://user:pass@127.0.0.1:1081).
    5. Copy the SOCKS5 parameters and enter them into your VPN app.

    Using Happ (Recommended):

    1. In whitelist-bypass, wait for "Tunnel Active" and tap Copy v2ray URL. This copies a link like socks://...@127.0.0.1:1081#WLB-1081.
    2. Open Happ, tap + (top right), and select Import from clipboard.
    3. Enable the WLB-1081 server in the list.

    Note: Because this avoids NetworkExtension, the SOCKS5 port may change between app launches. If the tunnel stops working after a restart, delete the old server in Happ and re-import the v2ray URL.