Let Clash handle all local network traffic.
# Create a separate user to run Clash
useradd clash
# Note down UID
id clash
# Use rest of the file in this gist as usual.
Add these into your ~/.docker/config.json
{
"proxies": {
"default": {
"http_proxy": "http://YOUR_NON_127_ADDRESS_OF_CLASH:CLASH_MIXED_PORT",
"https_proxy": "http://YOUR_NON_127_ADDRESS_OF_CLASH:CLASH_MIXED_PORT",
"no_proxy": "*.test.example.com,.example2.com,127.0.0.0/8"
}
}
}
Should set
allow lan
totrue
in your clash config