Skip to content

Instantly share code, notes, and snippets.

@adasThePrime
Last active November 22, 2026 06:23
Show Gist options
  • Select an option

  • Save adasThePrime/c804c3ad65b8da6956e1ea75d50ff46f to your computer and use it in GitHub Desktop.

Select an option

Save adasThePrime/c804c3ad65b8da6956e1ea75d50ff46f to your computer and use it in GitHub Desktop.

Run Cloudflare WARP as a SOCKS5 Proxy in Termux

This guide shows how to set up Cloudflare WARP in Termux and expose it as a local SOCKS5 proxy using wireproxy.

Prerequisites

Step 1: Update Termux and install required packages

Run these commands one by one:

pkg update && pkg upgrade -y
pkg install golang git -y
termux-setup-storage

Step 2: Install wgcf

Clone the repository and build the binary:

git clone https://github.com/ViRb3/wgcf.git
cd wgcf
go build -o wgcf .
chmod +x wgcf
mv wgcf $PREFIX/bin/wgcf

Step 3: Register and generate a WARP profile

Run the following commands:

wgcf register
wgcf generate

This creates a file named wgcf-profile.conf.

Step 4: Copy the generated profile to Downloads

cp wgcf-profile.conf ~/storage/downloads/

Now open wgcf-profile.conf from your Downloads folder in a text viewer.

Step 5: Create wireproxy.conf

Create and edit the configuration file:

nano wireproxy.conf

Paste the following content into the file and fill in the values from wgcf-profile.conf:

[Interface]
PrivateKey = ...
Address = ...
DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
MTU = ...

[Peer]
PublicKey = ...
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = ...

[Socks5]
BindAddress = 0.0.0.0:1180

Save the file in Nano

In Termux Nano, press:

  • CTRL + X
  • then press Enter

Step 6: Install wireproxy

go install github.com/windtf/wireproxy/cmd/wireproxy@latest

Add Go binaries to your PATH:

echo 'export PATH="$PATH:$HOME/go/bin"' >> ~/.profile
. ~/.profile
hash -r

Step 7: Start the SOCKS5 proxy

Run:

wireproxy -c wireproxy.conf -d -s
termux-wake-lock

Result

Your SOCKS5 proxy should now be available at:

127.0.0.1:1180

Stop the proxy

To stop it, run:

pkill wireproxy
termux-wake-unlock
exit

Notes

  • Disable any kind of power optimization for Termux.
  • Proxy will not work if VPN is active.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment