電訊茶室's Archiver

角色 發表於 2018-10-15 12:13

搬瓦工VPS + CentOS 7 64-bit BBR + V2Ray

[i=s] 本帖最後由 角色 於 2018-11-30 00:20 編輯 [/i]

要注意的事项:
1、VPS time difference between V2Ray client and server [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7239&pid=45695]Link[/url]
2、Single vmess and shadowsocks account [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7239&pid=45698]Link[/url]
3、Multiple UUIDs for V2Ray accounts using the same port number [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7239&pid=45708]Link[/url]
——————

1、你用“Install new OS” 安装新的OS,你选CentOS 7 64 BBR就可以。安装完后,系统会给你SSH port number(这个不会变),然后一个新的密码,如果你忘了,你可以看看你的邮箱。如果邮箱文件删了,那么只能重新安装一个新的。

2、用putty,输入给你IP address,port number,然后putty会进入搬瓦工的login prompt。输入root和password。

3、然后输入下面指令[code]
bash <(curl -L -s https://install.direct/go.sh)
[/code].

系统会自动更新需要的package。

4、如果安装成功,系统会出现[code]
PORT:22335
UUID:35ae4340-d28f-4e16-8c98-20fd80066b1c
Created symlink from /etc/systemd/system/multi-user.target.wants/v2ray.service to /etc/systemd/system/v2ray.service.
V2Ray v3.47 is installed.
[/code].

上面的信息解读如下:
PORT:22335 (是你的V2Ray的port number)
UUID:35ae4340-d28f-4e16-8c98-20fd80066b1c (是你的V2Ray的login name and password)

5. 刚安装好的V2Ray是没有启动,你需要用指令启动它。[code]
service v2ray start
[/code].

6. 看看是否已经启动[code]
service v2ray status
[/code].

7. 还有其他指令如stop,restart 等等可以使用,但是我很少用。

到现在V2Ray在搬瓦工VPS就大致上完成。对于一般跟人用已经很做够,但是如果你要多开几个用户,又或者建立Shadowsocks账户,那么需要去修改/etc/v2ray/config.json。

用一个V2Ray client,输入你的Server IP address,UUID and port number 就可以。

Remarks:
1、上面的port number 和 UUID每次安装都不一样,现在我提供是刚安装,如果我重新安装又会出现另外一组settings。

Tools:

UUDI Generator [url=https://www.uuidgenerator.net/]Link[/url]

角色 發表於 2018-10-15 14:04

[i=s] 本帖最後由 角色 於 2018-10-15 14:05 編輯 [/i]

原来CentOS的Linux kernel已经升到 4.10. (从version 4.9的kernel已经包含Google BBR)[code]
[root@host ~]# uname -a
Linux host.localdomain 4.10.4-1.el7.elrepo.x86_64 #1 SMP Sat Mar 18 12:50:10 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[/code]

vpn-learner 發表於 2018-10-28 15:03

师兄可否介绍下 用 搬瓦工 去 设置 V2Ray 和 用 Raspberry 去 设置 V2Ray 的 区别?
那个简单些? 速度两者比较又如何?
先谢谢了!

角色 發表於 2018-10-28 19:57

安装没有区别,是一样的。

至于效果主要看搬瓦工和香港的线路怎样,根部我过去使用了一个月来说,搬瓦工效果非常稳定,而香港的Raspberry有时好,有的时候不太稳定,但是总体来说都是稳定。

因为效果的PCCW光纤入户,有两个IP,有两个V2Ray,加上搬瓦工的V2Ray,现在有三个V2Ray,其他一个有问题,就可以用别的。

角色 發表於 2018-11-27 00:07

[i=s] 本帖最後由 角色 於 2018-11-27 00:19 編輯 [/i]

VPS time difference between V2Ray client and server

Source:[url]https://toutyrater.github.io/prep/start.html[/url]

最近因为美国搬瓦工的VPS server突然不工作,怀疑又给阿爷搞!但是SSH(不是用port 22)但是又可以用!于是重新安装最新的V2Ray,但是依然不能工作!但是之前我看过,如果有问题,看看两者(server,client)之间time difference,如果超过2分钟,例如3分钟。

在我的CentOS BBR VPS的time竟然超过2分钟,于是我尝试用NTP,但是都不成功,原来VPS blocked了NTP port number 123。那么真的没有办法,只能用手动方法去更新server time。我发现system time和hardware time是有区别,hardware time是比较准,但是上次因为用错command,把system time over write hard time。

Display system time command[code]
[root@host ~]# date
Mon Nov 26 11:08:00 EST 2018
[/code].

Set system time using 'date' command[code]
date hh:mm:ss
[/code],where hh:mm:ss should be set as close as the client system time as possible.

Display hardware clock time[code]
hwclock -r
[/code].

Set system time via hardware clock command 'hwclock'[code]
hwclock -s
[/code].

Set hardware time via system time[code]
hwclock -w
[/code].

角色 發表於 2018-11-27 02:19

[i=s] 本帖最後由 角色 於 2018-11-27 02:20 編輯 [/i]

Single vmess and shadowsocks account[code]
{
  "inbound": {
    "port": 12345,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": “UUID",
          "level": 1,
          "alterId": 64
        }
      ]
    }
  },
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  },
  "inboundDetour": [
    {
      "protocol": "shadowsocks",
      "port": 443,
      "settings": {
        "method": "chacha20-ietf-poly1305",
        "password": “ss_password",
        "level": 1
      }
    }
  ],
  "outboundDetour": [
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [
        {
          "type": "field",
          "ip": ["geoip:private"],
          "outboundTag": "blocked"
        }
      ]
    }
  }
}
[/code], where[code]
  "inboundDetour": [
    {
      "protocol": "shadowsocks",
      "port": 443,
      "settings": {
        "method": "chacha20-ietf-poly1305",
        "password": “ss_password",
        "level": 1
      }
    }
  ],
[/code]was added on purpose for shadowsocks account

角色 發表於 2018-11-30 00:18

[i=s] 本帖最後由 角色 於 2018-11-30 00:21 編輯 [/i]

Multiple UUIDs for V2Ray accounts using the same port number[code]
{
  "inbound": {
    "port": 12345,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": “UUID1",
          "level": 1,
          "alterId": 64
        },     <------ You have to add "," after "}".
        {
          "id": “UUID2",
          "level": 1,
          "alterId": 64
        }      <----- You do not need to put "," because it is the end of the "clients" field.
      ]
    }
  },
[/code].

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.