ssr一键安装脚本

wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ssrmu.sh && chmod +x ssrmu.sh && bash ssrmu.sh

参数: protocol [auth_chain_b] method [none] obfs [plain]

shadowsocksrr/shadowsocksr-csharp 客户端下载

BBR 加速 TCP 之 Rinetd 方式

手动搭建

仅支持 64 位系统。

1.下载文件到 /usr/bin/rinetd-bbr

 
1
wget -O /usr/bin/rinetd-bbr https://github.com/linhua55/lkl_study/releases/download/v1.2/rinetd_bbr_powered

2.设置权限

 
1
chmod a+x /usr/bin/rinetd-bbr

3.创建配置文件

 
1
vi /etc/rinetd-bbr.conf

输入以下内容

 
1
2
3
# bindadress bindport connectaddress connectport
 
0.0.0.0 443 0.0.0.0 443

其中的 443 请改为你的端口

IP 地址统一写 0.0.0.0

4.获取接口名称

 
1
2
3
4
5
6
7
8
9
10
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/void
    inet 127.0.0.2/32 scope host venet0
    inet 10.10.10.10/32 brd 10.10.10.10 scope global venet0:0

看具有公网 IP 的接口名称(比如我的公网 IP 是 10.10.10.10),上面这种的接口是 venet0:0 而不是 venet0

搬瓦工的 OpenVZ 应该都是 venet0:0 接口。

5.启动

 
1
/usr/bin/rinetd-bbr -f -c /etc/rinetd-bbr.conf raw venet0:0 &

注意:将最后的接口改为你上面获取到的接口。在命令最后面加 & 以使其能后台运行。

验证

正常情况下的输出:

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[    0.000000] Linux version 4.10.0+ (root@gcc) (gcc version 4.9.4 (Ubuntu 4.9.4-2ubuntu1~14.04.1) ) #1 Mon Jul 31 04:50:50 UTC 2017
[    0.000000] bootmem address range: 0x7f2acc000000 - 0x7f2acffff000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16159
[    0.000000] Kernel command line:  virtio_mmio.device=268@0x1000000:1
[    0.000000] PID hash table entries: 256 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory available: 64492k/0k RAM
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:4096
[    0.000000] lkl: irqs initialized
[    0.000000] clocksource: lkl: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.000001] lkl: time and timers initialized (irq2)
[    0.000003] pid_max: default: 4096 minimum: 301
[    0.000021] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.000023] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.009053] console [lkl_console0] enabled
[    0.009056] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009128] NET: Registered protocol family 16
[    0.009265] clocksource: Switched to clocksource lkl
[    0.009324] NET: Registered protocol family 2
[    0.009418] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.009421] TCP bind hash table entries: 512 (order: 0, 4096 bytes)
[    0.009503] TCP: Hash tables configured (established 512 bind 512)
[    0.009971] UDP hash table entries: 128 (order: 0, 4096 bytes)
[    0.009976] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
[    0.010060] virtio-mmio: Registering device virtio-mmio.0 at 0x1000000-0x100010b, IRQ 1.
[    0.010186] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[    0.010203] virtio-mmio virtio-mmio.0: Failed to enable 64-bit or 32-bit DMA.  Trying to continue, but this might not work.
[    0.010350] NET: Registered protocol family 10
[    0.010849] Segment Routing with IPv6
[    0.010859] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.010993] Warning: unable to open an initial console.
[    0.011006] This architecture does not have kernel memory protection.
[    2.169284] random: fast init done

查看 iptables 规则:

 
1
2
3
4
5
6
7
8
# iptables -t raw -nL
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443 /* LKL_RAW */
DROP       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443 /* LKL_RAW */
 
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

已经有两条规则了。

命令运行成功将命令添加到 /etc/rc.local 中

维护命令:

 
1
2
3
4
5
6
7
启动:/etc/init.d/shadowsocks start
停止:/etc/init.d/shadowsocks stop
重启:/etc/init.d/shadowsocks restart
状态:/etc/init.d/shadowsocks status
配置文件路径:/etc/shadowsocks.json
日志文件路径:/var/log/shadowsocks.log
安装路径:/usr/local/shadowsocks/shadowsoks

常见问题:

若出现CC混淆插件安装失败情况发生,多半因为服务器时间未能同步当前时间造成的。

建议在安装SSR脚本前执行下列操作:

 
1
2
3
4
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
yum install -y ntpdate
ntpdate time.windows.com

vps hiformance 设置备忘的更多相关文章

  1. xyplorer设置备忘

    xyplorer设置备忘https://www.cnblogs.com/liuzhaoyzz/p/9911665.html1.双击向上一级工具→配置→菜单,鼠标,安全性→鼠标→双击空白空间时向上一级. ...

  2. mysql主从数据库设置备忘

    [mysqld] binlog-do-db = databasename1 binlog-do-db = databasename2 binlog-do-db = databasename3 -- 且 ...

  3. pycharm ideavimrc设置备忘

    文件存放位置 windows下 C:\Users\你的用户名\.ideavimrc 注:如果要映射pycharm 中的一些命令可以 在pycharm 中 edit->Macros->Sta ...

  4. Proxmox VE 设置备忘

    现在PROXMOX 虚拟机一共两个(使用的是N3700 cpu的一个小机器主要为了省电.) 一个是ROS,经过折腾,IK8速度还不错就是资源占用比较大特比下载数据大时对CPU占用很大:OpenWRT不 ...

  5. ubuntu 初始设置备忘

    配置静态网络 vim /etc/network/interfaces auto eth0 #iface eth0 inet dhcp iface eth0 inet static address x. ...

  6. Mac常用设置备忘

    1.显示隐藏文件 1>命令行方式 显示:defaults write com.apple.finder AppleShowAllFiles -bool true 隐藏:defaults writ ...

  7. python虚拟环境相关设置备忘

    sudo  pip install virtualenv #安装虚拟环境 sudo pip install virtualenvwrapper #安装虚拟环境管理工具nano ~/.bashrc #修 ...

  8. ubuntu-常用设置备忘

    环境 系统平台:Ubuntu 16.04.6 其他版本设置也差不多 vim喜好设置 系统安装vim sudo apt-get install vim 通过修改 /etc/vim/vimrc 文件设置 ...

  9. 生产服务器环境最小化安装后 Centos 6.5优化配置备忘

    生产服务器环境最小化安装后 Centos 6.5优化配置备忘 作者:Memory 发布于:2014-8-13 15:00 Wednesday 服务器 本文 centos 6.5 优化 的项有18处: ...

随机推荐

  1. golang 如何查看程序执行消耗时间

    写代码过程中,有时需要分析代码块的时间消耗. 本文介绍使用time包中的Since函数查看程序执行时间. package main import ( "fmt" "tim ...

  2. R(5): sql 数据处理

    sqldf程序包是R语言中实用的数据管理辅助工具,但最新版本的包在处理中文时出现乱码,待解决 Usage:  sqldf(x, stringsAsFactors = FALSE,  row.names ...

  3. Win10 UEFI +Ghost +intel快速启动 新法完美安装

    http://tieba.baidu.com/p/4767004289?qq-pf-to=pcqq.c2c Win10 如果主板不用Bios 而用UEFI引导启动,速度快,界面好.现在一般都用win1 ...

  4. Spring的IOC原理 通俗解释

    1. IoC理论的背景我们都知道,在采用面向对象方法设计的软件系统中,它的底层实现都是由N个对象组成的,所有的对象通过彼此的合作,最终实现系统的业务逻辑. 图1:软件系统中耦合的对象 如果我们打开机械 ...

  5. Android自动化测试中AccessibilityService获取控件信息(2)-三种方式对比

    Android自动化测试中AccessibilityService获取控件信息(2)-三种方式对比   上一篇文章: Android自动化测试中AccessibilityService获取控件信息(1 ...

  6. priority_queue使用方法详解

    1.介绍 优先队列是一种容器,它可以使得其第一个元素始终是它包含的最大元素,具体实现原理是堆排序. 它支持以下操作: empty() size() top() push() pop() 在使用prio ...

  7. 汇编,浮点运算符,fldpi,fmul等指令说明.

    协处理器指令系统 协处理器共有68条不同的指令,汇编程序在遇到协处理器指令助记符时,都会将其转换成机器语言的ESC指令,ESC指令代表了协处理器的操作码. 协处理器指令在执行过程中,需要访问内存单元时 ...

  8. Linux 命令集合-错误

    错误1 说明:在linux下,./xxx.sh执行shell脚本时会提示No such file or directory.但shell明明存在,为什么就是会提示这个呢? 这种其实是因为编码方式不对, ...

  9. Unreal Engine 4(虚幻UE4)GameplayAbilities 插件入门教程(五)技能属性集(AttributeSet)

    如果没有完成前面的教程,请前往学习.先上一段理论介绍(源于https://wiki.unrealengine.com/GameplayAbilities_and_You#GameplayTasks): ...

  10. [UE4]C++中extern关键字浅谈

    变量声明和变量是有区别的 extern int i; //只是声明i而非定义i int j; //声明而且还定义了j 任何一个显式初始化的声明都将成为定义,而不管有没有extern,extern语句一 ...