Posts

Ubuntu 24.04上搭建Hysteria2翻墙教程


VPS端配置:

sudo -i

bash <(curl -fsSL https://get.hy2.sh/)

openssl req -x509 -nodes -newkey ec:<(openssl ecparam -name prime256v1) -keyout /etc/hysteria/server.key -out /etc/hysteria/server.crt -subj “/CN=bing.com” -days 36500 && sudo chown hysteria /etc/hysteria/server.key && sudo chown hysteria /etc/hysteria/server.crt

nano /etc/hysteria/config.yaml

#把“password: ”后面的密码更改为自定的密码

listen: :443

tls:
  cert: /etc/hysteria/server.crt
  key: /etc/hysteria/server.key

auth:
  type: password
  password: CmZjPxNOyTs2V3WraD

masquerade:
  type: proxy
  proxy:
    url: https://bing.com/
    rewriteHost: true

quic:
  initStreamReceiveWindow: 8388608
  maxStreamReceiveWindow: 8388608
  initConnReceiveWindow: 20971520
  maxConnReceiveWindow: 20971520
  maxIdleTimeout: 30s
  maxIncomingStreams: 1024
  disablePathMTUDiscovery: false

bandwidth:
  up: 1 gbps
  down: 1 gbps

acl:
  inline:
    - reject(all, udp/443)

transport:
  udp:
    hopInterval: 10s

#删除原配置文件的全部内容,将上面修改好的代码完整复制,一次性粘贴到SSH窗口,然后按“Ctrl+O”,然后按“回车键”保存,再按“Ctrl+X”退出编辑

Ubuntu 24.04上搭建Xray-Reality翻墙教程


一、使用PuTTY登录VPS:

1、双击桌面上的“PuTTY(64 Bit)”快捷方式图标打开软件;

2、在“Host Name (or IP address)”下的输入框中填入IP地址,在“Saved Sessions”下的输入框中填入自定的名称;

3、在左侧选项卡中依次点击“Connection”→“Data”,在右侧Auto-login username后的输入框中填入登录用户名;

4、在左侧选项卡中点击“Session”,在右侧点击“Save”;

5、在“Saved Sessions”下的选择框(Saved Sessions下的第二个框)中选中之前保存的名称,点击“Load”,点击“Open”即可打开SSH连接窗口,然后输入登录密码即可。


二、使用PuTTY创建登录密钥:

1、打开PuTTY安装目录(例如:D:\Program Files\PuTTY),双击“puttygen.exe”,点击“Generate”,在进度条下晃动鼠标光标,点击“Save private key”,点击“是”,然后选择一个位置、输入名称、保存;

2、全选keys file:下方框中的内容,把它复制下来;

3、用密码登录VPS,逐行输入以下命令:

sudo -i

mkdir /root/.ssh

chmod 700 /root/.ssh

nano /root/.ssh/authorized_keys

4、把第2步复制的密钥内容粘贴进去,按“Ctrl+O”,然后按“回车键”保存,再按“Ctrl+X”退出编辑;

5、退出PuTTY,然后重新打开PuTTY,载入主机名,在左侧选项卡中依次点击“SSH”前的“+”→“Auth”前的“+”→“Credentials”,在右侧“Private key file for authentication:”下方第一个框后点击“Browse…”,选择之前保存的.ppk格式的密钥文件;

6、在左侧选项卡中点击“Session”,在右侧点击“Save”,然后点击“Open”即可。


三、使用密钥文件登录VPS:

1、双击桌面上的“PuTTY(64 Bit)”快捷方式图标打开软件;

2、在“Host Name (or IP address)”下的输入框中填入IP地址,在“Saved Sessions”下的输入框中填入自定的名称;

Welcome to My Blog

Welcome, and thanks for stopping by.

This blog is a personal space where I share what I learn, think about, and build along the way. Topics here may include technology, tools, problem-solving, and occasional reflections on work and life. Some posts are practical and hands-on, others are simply notes I want to keep for future reference.

I created this blog for a simple reason: to write things down clearly, honestly, and usefully.