55

将v2rayN作为反向代理服务器使用

 3 years ago
source link: https://www.liesauer.net/blog/post/v2rayn-as-reverse-proxy-server.html
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.
neoserver,ios ssh client
  1. 一台闲置Windows服务器(Linux原理一样)

将闲置服务器作为反向代理服务器以便在写一些小脚本时当作代理使用访问(用途远超如此,看个人需求)。

:one:v2rayN设置

基础设置->开启UDP
2022-04-03_150932.png

v2rayN设置->允许来自局域网的连接
2022-04-03_151006.png

:two:添加代理认证

v2rayN不支持直接添加认证,但是v2ray-core本身是支持的,所以将当前节点的配置导出、修改,再导入来实现。

相关配置说明:

首先将当前节点导出一个配置
2022-04-03_151215.png

使用任意文本编辑器打开并修改以下配置,认证账号可多个。

socks配置:

  1. "settings": {
  2. "auth": "password",
  3. "accounts": [
  4. {
  5. "user": "test",
  6. "pass": "test"
  7. }
  8. ]
  9. }

2022-04-03_151613.png

http配置:

  1. "settings": {
  2. "accounts": [
  3. {
  4. "user": "test",
  5. "pass": "test"
  6. }
  7. ]
  8. }

2022-04-03_151659.png

保存后再次导入此配置即可
2022-04-03_151757.png


还要将导入的节点设为活动!
还要将导入的节点设为活动!
还要将导入的节点设为活动!

:three:更改代理模式

右键v2rayN托盘,系统代理->不改变系统代理
2022-04-03_154811.png

:four:开放防火墙

我用的是3080830809两个端口,30808socks协议,30809http协议,具体看你们自己。
2022-04-03_152125.png

:five:代理测试

使用Postman测试
2022-04-03_152227.png

测试通过
2022-04-03_152350.png

这样子就可以愉快的写脚本了。


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK