Cloudflare WARP on Enigma2 python3-based images

Status
Not open for further replies.

WaRp

(∩`-´)⊃━☆゚.*・。゚
Staff member
Administrator
Messages
30,040
WARP
A simple and fast way to run CloudflareWARP on Enigma2 ...
Disclaimer -> tested on OpenATV 7.3, OpenBH 5.3, and OpenPli 9 ... In theory, it should work on any image where there are necessary dependencies on the feed
1) Download an unofficial cross-platform CLI to generate the CloudflareWARP configuration file -> CF config generator. The binary you need depends on the operating system you are using on your computer
2) Create a configuration file ... Please read the instructions on GitHub carefully. It is possible to both create a new account and add devices to an existing or newly created one​
wgcf register
wgcf generate​
The result will be a configuration file with the following contents​
[Interface]
PrivateKey = <PRIVATE KEY>
Address = 172.16.0.2/32
Address = 2606:4700:110:869c:d632:852b:614f:d896/128
DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = <PUBLIC KEY>
AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
Endpoint = engage.cloudflareclient.com:2408​
3) Edit this file as follows:​
[Interface]
PrivateKey = <PRIVATE KEY>
Address = 172.16.0.2/24
DNS = 1.1.1.1
MTU = 1420

PostUp = ip route add 162.159.192.1 via 192.168.1.1
PostDown = ip route del 162.159.192.1 via 192.168.1.1

[Peer]
PublicKey = <PUBLIC KEY>
AllowedIps = 0.0.0.0/1, 128.0.0.0/1
Endpoint = engage.cloudflareclient.com:2408
PersistentKeepalive = 25​
Where:
162.159.192.1 - is the IP address of the domain engage.cloudflareclient.com
192.168.1.1 - IP address of your home router

Save your editing results

4) Connect to the tuner via SSH or telnet, install the necessary dependencies and script​
opkg update && opkg install wireguard-tools wireguard-tools-bash-completion openresolv

wget -O /etc/init.d/wireguard.sh https://gist.githubusercontent.com/kbabioch/5dd8801e702e519ed18d9b17cacae716/raw/a19ac8e728040fd66ad846fb9299feeac7b92de4/wireguard

chmod 755 /etc/init.d/wireguard.sh​
5) Copy the configuration file obtained in step 3 to /etc/wireguard via FTP
6) Run the script to check if it works​
/etc/init.d/wireguard.sh start
curl -4 ip-api.com​
If you did everything correctly, you will see a console output of information about your current ISP and IP address... This will be Cloudflare Inc. and “some” IP address belonging to this company

7) To stop VPN run the following command in the console​
/etc/init.d/wireguard.sh stop​
8) You can check that you are again "on your native IP and ISP"​
curl -4 ip-api.com​
9) If you need the VPN to start automatically when the tuner is rebooted (turned on), then add the script to autorun with the following command in the console (do this only if everything works for you in points 6 and 7)
update-rc.d -v wireguard.sh start 99 3 . stop 99 6 .​
10) To remove the script from startup, execute the following command in the terminal​
update-rc.d -v -f wireguard.sh remove​

1.png2.png

Thanks pepsik​
 
Status
Not open for further replies.
Top