50 lines
1.6 KiB
Markdown
50 lines
1.6 KiB
Markdown
# serjs/socks5-server LAN IP deployment
|
|
|
|
This folder contains compose examples for running `serjs/go-socks5-proxy`.
|
|
|
|
## Important finding on this Mac / OrbStack host
|
|
|
|
The Mac is on LAN `192.168.2.0/24` as `192.168.2.69`.
|
|
Docker is running inside OrbStack, whose Docker daemon network interface is `198.19.249.2/24`, not the physical `en0` LAN interface.
|
|
|
|
Because of that, Docker `macvlan`/`ipvlan` cannot attach directly to macOS `en0` from inside OrbStack. In testing, Compose can create a macvlan container with metadata IP `192.168.2.200`, but the Mac/LAN cannot ARP or connect to it (`192.168.2.200:1080` times out and ARP stays incomplete). So a true same-LAN container IP is normally feasible on a native Linux host with a real NIC, but not directly on this current macOS/OrbStack setup via only docker-compose.
|
|
|
|
## Recommended on this Mac: host-published port
|
|
|
|
Use `docker-compose.yml`. It runs the SOCKS5 server and publishes port `1080` on the Mac:
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
# edit .env
|
|
# then:
|
|
docker compose up -d
|
|
```
|
|
|
|
Access from LAN:
|
|
|
|
```text
|
|
192.168.2.69:1080
|
|
```
|
|
|
|
## Real LAN IP version for a Linux host
|
|
|
|
Use `docker-compose.macvlan-linux.yml` on a Linux machine physically connected to `192.168.2.0/24`.
|
|
|
|
Before using it:
|
|
|
|
1. Make sure `192.168.2.200` is outside DHCP range or reserved for this container.
|
|
2. Replace `parent: eth0` with the Linux host NIC name.
|
|
3. Confirm the intended default gateway. In this chat BOSS asked for `192.168.2.1`, but this Mac's current default gateway is `192.168.2.8`.
|
|
|
|
Run:
|
|
|
|
```bash
|
|
docker compose -f docker-compose.macvlan-linux.yml up -d
|
|
```
|
|
|
|
Access:
|
|
|
|
```text
|
|
192.168.2.200:1080
|
|
```
|