webrepl icon indicating copy to clipboard operation
webrepl copied to clipboard

I've added a SOCKS proxy to the webrepl_cli cli and it blows my mind

Open rikvermeer opened this issue 2 years ago • 0 comments

Public dynamic secure reverse tunnel remote webrepl CLI

./webrepl_socks.py "10.44.5.4:8266" -p "mypass" --> micropython_001 ... micropython_50

Monkeypatch webREPL SOCKS!

import socket
import socks

socks.set_default_proxy(socks.SOCKS5, "localhost", $localport)
socket.socket = socks.socksocket

I run micropythons in a remote network with raspberry pi as gateway. I use NGROK to expose a TCP endpoint and upon connection success I send myself a homecall with the NGROK ip and port.

ssh -D $localport -p $ngrok_port $ngrok_ip --> ngrok --> $pi@raspberry: openssh && arp-ping

On the gateway I run ARP pings so I can bind the MAC addresses to (dynamic) IPs and know where to connect to. The latest release of webrepl, with the CLI functionality, made me so happy :)

I can now remote control them over CLI both in browser and commandline.

Thanks! webrepl socks!

rikvermeer avatar Jan 13 '23 23:01 rikvermeer