Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ docker run --name ocserv \
-d myidwy/ocserv
```

如果需要,去掉对UDP 443端口的支持,命令行修改如下,因为UDP现在似乎受到的干扰比较多,所以仅仅使用TCP 443端口。如果UDP与TCP端口一起打开的话,Anyconnect默认先会试着使用UDP,如果有问题会退回使用TCP端口。
```
docker run --name ocserv --privileged -p 443:443 -v /var/docker/ocserv:/var/docker/ocserv -d myidwy/ocserv
```

# 配置文件

- 主配置文件:`/etc/ocserv/ocserv.conf`
Expand All @@ -29,7 +34,7 @@ docker logs ocserv
进入容器:

```
docker exec -it shadowsocks bash
docker exec -it ocserv bash
```

创建用户
Expand All @@ -51,6 +56,7 @@ docker exec -it ocserv ocpasswd -c /etc/ocserv/ocpasswd -d <your_username>
```
/cert.sh <your_username>
```
用户p12证书创建好后,在docker容器的/etc/ocserv/certs/文件夹下,然后可以用docker cp或者scp把p12证书文件拷贝出来

重启服务

Expand All @@ -70,4 +76,4 @@ supervisortl restart ocserv
| **SRV_CN** | VPN server |
| **SRV_DNS** | www.example.com |
| **SRV_ORG** | My Company |
| **SRV_DAYS** | -1 |
| **SRV_DAYS** | -1 |