11

给ss加上v2ray-Plugin

 2 years ago
source link: https://shingle.me/post/%E7%BB%99ss%E5%8A%A0%E4%B8%8Av2ray-plugin/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

给ss加上v2ray-Plugin

2019-07-23 17:08:32 约 877 字 预计阅读 2 分钟 19769 次阅读

先吐槽一下, 网上搜到的文章, 基本没有能看一遍就会配置的文章.

为了给后来者节省时间,写了这个基本的配置教程

最近发现 ss 的simple-obfs插件停止维护了, 取而代之的是叫v2ray-Plugin的插件, 看名字就知道是从v2ray来源的混淆灵感.

不多 bb, 直接开始配置

服务器配置

我个人喜欢基于 docker 安装一切服务, 以后迁移和备份只需要几个配置文件就行比较方便,本文也是以这种方式配置的.

首先去hub.docker.com 找找有没有官方写好的镜像, 咳咳, 没有找到.

于是自己动手配置一遍流程, 然后写成 Dockerfile,就能一劳永逸了.

好在发现已经有人写好了https://github.com/Acris/docker-shadowsocks-libev

看了一下他写的 Dockerfile,v2ray-Plugin是go写的,作者用了多阶段构建,不会导致镜像很大, 没什么问题!

下一步直接照着作者示例的 docker-compose 文件撸, docker-compose是一个方便创建和修改docker容器的官方工具, 具体介绍和安装就自行搜索吧.

version: "3.7"
services:
  shadowsocks-libev:
    container_name: shadowsocks-libev
    image: acrisliu/shadowsocks-libev:latest
    ports:
      - "8388:8388/tcp"
      - "8388:8388/udp"
    volumes:
      - /root/.acme.sh:/root/.acme.sh:ro
    environment:
      - PASSWORD=YourPassword
      - ARGS=--plugin v2ray-plugin --plugin-opts server;tls;host=yourdomain.com;path=/v2ray;cert=/root/.acme.sh/yourdomain.com/yourdomain.com.cer;key=/root/.acme.sh/yourdomain.com/yourdomain.com.key -u
    restart: always

YourPassword改成你自己的密码, yourdomain.com必须是你自己的证书域名,可以用 acme.sh 工具生成, 没有域名的可以用官方给的最简单的配置, 修改以下部分:

    environment:
      - PASSWORD=YourPassword
      - ARGS=--plugin v2ray-plugin --plugin-opts server; -u

保存文件为 docker-compose.yaml, 执行docker-compose up -d启动即可.

要注意, 作者这个版本没有加fast-open选项, 需要的可以在ARGS后面自己添加

客户端配置

我电脑是 macOS, 官方的最新版本合并了v2ray-Plugin功能但是还没发出来, 可以先用提交过的版本: https://github.com/shadowsocks/ShadowsocksX-NG/files/3269413/ShadowsocksX-NG.zip

打开之后会多出两个输入框:插件,插件选项

插件填写v2ray-plugin

插件选项 填写 mux=5;path=/v2ray;tls;host=yourdomain.com;certRaw=cer证书内容

注意要和你服务器配置的相同, mux 是客户端设置的并发连接数, 默认是1

证书要注意一定要是没过期且认证过的, 自己签的那种不行, 证书对应的域名也和服务器配置的保持一样.

其他客户端同理.

文章作者 shingle (如需转载请注明本文链接,违者必究)

上次更新 2019-07-23 17:08:32

许可协议 CC BY-NC-ND 4.0

赞赏支持 赞赏列表

抛弃nextcloud,开始搭建使用cozycloud 时戳提醒开发笔记(一)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK