1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-02 03:37:40 +02:00

add v2ray

This commit is contained in:
kev 2024-05-07 16:51:12 +08:00
parent b844edd300
commit 916f30b393
5 changed files with 76 additions and 41 deletions

View File

@ -280,6 +280,7 @@ A collection of delicious docker recipes.
- [x] stunnel-arm
- [x] tinyproxy
- [x] tor
- [x] v2ray :cn:
- [x] wireproxy
## VPN
@ -510,7 +511,6 @@ A collection of delicious docker recipes.
- [x] trinodb/trino
- [x] ghcr.io/coqui-ai/tts-cpu
- [x] louislam/uptime-kuma
- [x] v2ray/official :cn:
- [x] mpromonet/v4l2rtspserver :camera:
- [x] centurylink/watchtower
- [x] aceberg/watchyourlan

28
v2ray/Dockerfile Normal file
View File

@ -0,0 +1,28 @@
#
# Dockerfile from v2ray
#
FROM alpine:3
MAINTAINER EasyPi Software Foundation
ARG V2RAY_VERSION=5.16.1
ARG V2RAY_OS=linux
ARG V2RAY_ARCH=64
ARG V2RAY_FILE=v2ray-${V2RAY_OS}-${V2RAY_ARCH}.zip
ARG V2RAY_URL=https://github.com/v2fly/v2ray-core/releases/download/v${V2RAY_VERSION}/${V2RAY_FILE}
ENV V2RAY_LOCATION_ASSET=/usr/local/share/v2ray
ENV V2RAY_LOCATION_CONFIG=/etc/v2ray
RUN set -xe \
&& apk add --no-cache curl unzip \
&& curl -sSL ${V2RAY_URL} > v2ray.zip \
&& unzip -j v2ray.zip 'v2ray' -d /usr/local/bin \
&& unzip -j v2ray.zip '*.dat' -d $V2RAY_LOCATION_ASSET \
&& unzip -j v2ray.zip '*.json' -d $V2RAY_LOCATION_CONFIG \
&& rm v2ray.zip \
&& apk del curl unzip
EXPOSE 10086
CMD ["v2ray", "run"]

View File

@ -3,17 +3,7 @@ v2ray
[v2ray][1] is a platform for building proxies to bypass network restrictions.
```yaml
v2ray:
image: v2ray/official
ports:
- "8001:8001"
volumes:
- ./data:/etc/v2ray
restart: always
```
Download sample config [here][2].
Download sample [config.json][2].
[1]: https://www.v2ray.com/
[2]: https://github.com/v2ray/install/raw/master/docker/official/config.json
[1]: https://v2fly.org/
[2]: https://github.com/v2fly/v2ray-core/tree/master/release/config

View File

@ -1,24 +1,39 @@
{
"log" : {
"access": "/dev/stdout",
"error": "/dev/stderr",
"loglevel": "warning"
},
"inbound": {
"port": 8001,
"inbounds": [
{
"port": 10086,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "11111111-2222-3333-4444-555555555555",
"id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
"level": 1,
"alterId": 32
"alterId": 64
}
]
}
},
"outbound": {
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "blocked"
}
]
}
}

View File

@ -1,7 +1,9 @@
v2ray:
image: v2ray/official
version: "3.8"
services:
v2ray:
image: vimagick/v2ray
ports:
- "8001:8001"
- "10086:10086"
volumes:
- ./data:/etc/v2ray
restart: always
restart: unless-stopped