Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Neilpang/wgcf-docker
CloudFlare warp in docker
https://github.com/Neilpang/wgcf-docker
Last synced: 3 months ago
JSON representation
CloudFlare warp in docker
- Host: GitHub
- URL: https://github.com/Neilpang/wgcf-docker
- Owner: Neilpang
- Created: 2021-06-05T14:37:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-04T22:24:16.000Z (about 1 year ago)
- Last Synced: 2024-10-27T12:41:11.525Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 24.4 KB
- Stars: 143
- Watchers: 3
- Forks: 39
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- stars - Neilpang/wgcf-docker
README
# wgcf-docker
CloudFlare warp in docker1. Run a single container:
```
docker run --rm -it \
--name wgcf \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--privileged --cap-add net_admin \
-v /lib/modules:/lib/modules \
-v $(pwd)/wgcf:/wgcf \
neilpang/wgcf-dockerThe above command will enable both ipv4 and ipv6, you can enable ipv4 or ipv6 only like following:
#enable ipv4 only:
docker run --rm -it \
--name wgcf \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--privileged --cap-add net_admin \
-v /lib/modules:/lib/modules \
-v $(pwd)/wgcf:/wgcf \
neilpang/wgcf-docker -4#enable ipv6 only:
docker run --rm -it \
--name wgcf \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--privileged --cap-add net_admin \
-v /lib/modules:/lib/modules \
-v $(pwd)/wgcf:/wgcf \
neilpang/wgcf-docker -6```
or:
```
docker run --rm -it \
--name wgcf \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--privileged --cap-add net_admin \
-v /lib/modules:/lib/modules \
-v $(pwd)/wgcf:/wgcf \
neilpang/wgcf-docker:alpineThe above command will enable both ipv4 and ipv6, you can enable ipv4 or ipv6 only like following:
#enable ipv4 only:
docker run --rm -it \
--name wgcf \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--privileged --cap-add net_admin \
-v /lib/modules:/lib/modules \
-v $(pwd)/wgcf:/wgcf \
neilpang/wgcf-docker:alpine -4#enable ipv6 only:
docker run --rm -it \
--name wgcf \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--privileged --cap-add net_admin \
-v /lib/modules:/lib/modules \
-v $(pwd)/wgcf:/wgcf \
neilpang/wgcf-docker:alpine -6```
2. If another container needs to use the wgcf network, run it like:
```
docker run --rm -it --network container:wgcf curlimages/curl curl ipinfo.io
```
3. Docker-compose example:
```
Enable both ipv4 and ipv6 by default:version: "2.4"
services:
wgcf:
image: neilpang/wgcf-docker:latest
volumes:
- ./wgcf:/wgcf
- /lib/modules:/lib/modules
privileged: true
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
cap_add:
- NET_ADMIN
test:
image: curlimages/curl
network_mode: "service:wgcf"
depends_on:
- wgcf
command: curl ipinfo.ioEnable ipv6 only:
version: "2.4"
services:
wgcf:
image: neilpang/wgcf-docker:latest
volumes:
- ./wgcf:/wgcf
- /lib/modules:/lib/modules
privileged: true
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
cap_add:
- NET_ADMIN
command: "-6"
test:
image: curlimages/curl
network_mode: "service:wgcf"
depends_on:
- wgcf
command: curl ipv6.ip.sbEnable ipv4 only:
version: "2.4"
services:
wgcf:
image: neilpang/wgcf-docker:latest
volumes:
- ./wgcf:/wgcf
- /lib/modules:/lib/modules
privileged: true
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
cap_add:
- NET_ADMIN
command: "-4"
test:
image: curlimages/curl
network_mode: "service:wgcf"
depends_on:
- wgcf
command: curl ipinfo.io```
or:
```
Enable both ipv4 and ipv6 by default:
version: "2.4"
services:
wgcf:
image: neilpang/wgcf-docker:alpine
volumes:
- ./wgcf:/wgcf
- /lib/modules:/lib/modules
privileged: true
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
cap_add:
- NET_ADMIN
test:
image: curlimages/curl
network_mode: "service:wgcf"
depends_on:
- wgcf
command: curl ipinfo.io
Enable ipv6 only:
version: "2.4"
services:
wgcf:
image: neilpang/wgcf-docker:alpine
volumes:
- ./wgcf:/wgcf
- /lib/modules:/lib/modules
privileged: true
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
cap_add:
- NET_ADMIN
command: "-6"
test:
image: curlimages/curl
network_mode: "service:wgcf"
depends_on:
- wgcf
command: curl ipv6.ip.sbEnable ipv4 only:
version: "2.4"
services:
wgcf:
image: neilpang/wgcf-docker:alpine
volumes:
- ./wgcf:/wgcf
- /lib/modules:/lib/modules
privileged: true
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
cap_add:
- NET_ADMIN
command: "-4"
test:
image: curlimages/curl
network_mode: "service:wgcf"
depends_on:
- wgcf
command: curl ipinfo.io```