问题描述

两台电脑A和B,A为Windows系统,可访问外网,安装有v2ray,B为Linux系统,不可访问外网,A的第二张网卡与B为同一网段,A的IP为10.0.0.117,B的IP为10.0.0.12,实现B通过A访问外网的功能。

第一步 Windows端设置

v2ray设置-基础设置-开启http代理,v2rayN设置-允许来自局域网的连接,http代理端口1081。

第二步 Linux端设置

打开 /etc/profile,添加

http_proxy=http://10.0.0.117:1081
https_proxy=http://10.0.0.117:1081
ftp_proxy=http://10.0.0.117:1081
export http_proxy
export ftp_proxy
export https_proxy

执行 source /etc/profile,打开/etc/yum.conf,添加

proxy=http://10.0.0.117:1081

打开 /root/.bashrc,添加

export http_proxy=”http://10.0.0.117:1081”

0 评论