老E的博客

  • 首页
  • 关于
  • 技术应用
    • VPS相关
    • AI相关
    • 盒子相关
    • 其他
  • 订阅Youtube频道
  • 网络加速
    • expressvpnNo.1 ExpressVPN
    • 最佳免费VPN-PrivadoVPN
    • NordVPN
    • 廉价王者-Surfshark
    • PrivateInternetAccess
    • 解锁一切-PrivateVPN
  • 公益资源
    • AI导航
    • 工具下载
    • Docker镜像加速
  • 友情链接
    • tickcloudTickcloud
老E的博客
专注记录并分享跨境技术应用及随想
  1. 首页
  2. 技术应用
  3. VPS相关
  4. 正文

部署新开通VPS代理节点及客户端配置

2023年8月7日 1204次阅读 0条评论
clawcloud
expressvpn best vpn
privado vpn
surfshark vpn
private vpn
pia vpn
nord vpn

新开通的VPS上,如何手动、快速部署代理节点并且使用正确配置的客户端进行链接?在不借助一键脚本的前提下,可以通过整个过程了解基本原理。本文介绍在新开通的VPS上,使用「gost」,按步骤快速部署专属代理节点,以及客户端配置与连接的方法。有关客户端配置的详细信息,可见博文「不使用额外工具配置本地代理客户端」。

1.前提与必要说明

    • 一台刚开通的VPS
    • 所有用户名、密码、端口请务必修改

2.可选:定义root密码

sudo passwd root
su -

3.更新系统

apt update
apt upgrade -y

4.可选:安装、打开ufw防火墙

apt install ufw
ufw allow 22/tcp
ufw enable

#如需更改sshd端口,安全组、防火墙开放端口的同时,还需修改sshd配置文件,取消注释、修改端口定义
#ufw allow 658/tcp
#sed -i 's/^#\?Port.*$/Port 658/g' /etc/ssh/sshd_config

5.允许密码登录、root登录

sed -i 's/^#\?PermitRootLogin.*$/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/^#\?PasswordAuthentication.*$/PasswordAuthentication yes/g' /etc/ssh/sshd_config

systemctl restart sshd

6.启用tcp bbr加速

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p

#lsmod | grep bbr
#reboot
#sysctl net.ipv4.tcp_congestion_control

7.安装代理服务器

mkdir -p /opt/gost
curl -sSL -o gost.tar.gz https://github.com/go-gost/gost/releases/download/v3.0.0-rc8/gost_3.0.0-rc8_linux_amd64v3.tar.gz && tar -zxvf ./gost.tar.gz -C /opt/gost

#rm -f *gz

8.配置systemd守护与开机自启

cat < /etc/systemd/system/gost.service
[Unit]
Description=GOSTv3-Server of GO simple tunnel
Documentation=https://gost.run/
After=network.target

[Service]
Type=simple
ExecStart=/opt/gost -L relay+wss://username:password@:8443
Restart=always

#以下两行仅适用于轻量弹性云服务器(ECSs)
#CPUQuota=50%
#MemoryLimit=256M

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable gost
systemctl start gost
#systemctl status gost

9.可选:打开端口

ufw allow 8443/tcp
ufw enable

10.配置本地客户端

(1)可选:不使用其他GUI工具

step 1 下载文件gost.ps1,gost.bat并将其放入gost解压目录

step 2 打开gost.ps1,编辑ip、协议、服务器等信息后保存

step 3 创建快捷方式,并剪切至"%APPDATA%\Microsoft\Windows\Start Menu\Programs",然后在开始菜单中所有应用中右键可"固定到开始屏幕"

tep 4 浏览器插件指向127.0.0.1,协议、端口与-L参数指定的一致,应用选项即可

(2)可选:使用GUI工具,通过插件方式加载

本作品采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可
标签: gost proxy vpn vps 代理 翻墙 虚拟专用网络
最后更新:2024年5月28日

老E

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

站内搜索
归档
  • 2025 年 5 月
  • 2025 年 4 月
  • 2025 年 3 月
  • 2025 年 2 月
  • 2025 年 1 月
  • 2024 年 12 月
  • 2024 年 11 月
  • 2024 年 10 月
  • 2024 年 9 月
  • 2024 年 8 月
  • 2024 年 7 月
  • 2024 年 6 月
  • 2024 年 5 月
  • 2024 年 4 月
  • 2024 年 3 月
  • 2024 年 2 月
  • 2024 年 1 月
  • 2023 年 12 月
  • 2023 年 11 月
  • 2023 年 10 月
  • 2023 年 9 月
  • 2023 年 8 月
  • 2023 年 7 月
  • 2023 年 6 月

Copyright ©2023-2025 Appscross. All Rights Reserved.