“Docker 安装 v2ray”的版本间的差异
跳到导航
跳到搜索
Jihongchang(讨论 | 贡献) |
Jihongchang(讨论 | 贡献) |
||
第1行: | 第1行: | ||
− | https://github.com/v2fly/docker<syntaxhighlight lang="shell-session"> | + | https://github.com/v2fly/docker |
+ | |||
+ | === 拉取镜像 === | ||
+ | <syntaxhighlight lang="shell-session"> | ||
[root@your-vps ~]# docker pull v2ray/official | [root@your-vps ~]# docker pull v2ray/official | ||
Using default tag: latest | Using default tag: latest | ||
第14行: | 第17行: | ||
docker.io/v2ray/official:latest | docker.io/v2ray/official:latest | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === 在宿主机上准备配置文件 === | ||
+ | /path/to/config.json<syntaxhighlight lang="console"> | ||
+ | { | ||
+ | "inbounds": [{ | ||
+ | "port": 443, | ||
+ | "protocol": "vmess", | ||
+ | "settings": { | ||
+ | "clients": [ | ||
+ | { | ||
+ | "id": "300836a9-aad8-4ea3-a492-807934c1090d", | ||
+ | "level": 1, | ||
+ | "alterId": 64 | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | "streamSettings": { | ||
+ | "network": "ws", | ||
+ | "security": "tls", | ||
+ | "tlsSettings": { | ||
+ | "certificates": [ | ||
+ | { | ||
+ | "certificateFile": "/etc/v2ray/v2ray.crt", | ||
+ | "keyFile": "/etc/v2ray/v2ray.key" | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | }], | ||
+ | "outbounds": [ | ||
+ | { | ||
+ | "protocol": "freedom", | ||
+ | "settings": {} | ||
+ | } | ||
+ | ] | ||
+ | |||
+ | |||
+ | } | ||
</syntaxhighlight> | </syntaxhighlight> |
2023年2月7日 (二) 04:02的版本
https://github.com/v2fly/docker
拉取镜像
[root@your-vps ~]# docker pull v2ray/official
Using default tag: latest
latest: Pulling from v2ray/official
c9b1b535fdd9: Pull complete
e988f487316f: Pull complete
9f14b9e76a1c: Pull complete
ba8aa6f3f262: Pull complete
47a7d45748ed: Pull complete
a1eaab65098b: Pull complete
95f134d2f540: Pull complete
Digest: sha256:978c67f3dba2afb01b710620f8bc0392b36729facad466b90a49f3d7f30404be
Status: Downloaded newer image for v2ray/official:latest
docker.io/v2ray/official:latest
在宿主机上准备配置文件
/path/to/config.json
{
"inbounds": [{
"port": 443,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "300836a9-aad8-4ea3-a492-807934c1090d",
"level": 1,
"alterId": 64
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"certificates": [
{
"certificateFile": "/etc/v2ray/v2ray.crt",
"keyFile": "/etc/v2ray/v2ray.key"
}
]
}
}
}],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}