1 menghuan 2022-02-22 19:53:14 +08:00 clashX 增强模式好像可以 |
![]() | 2 bao3 2022-02-22 19:55:54 +08:00 via iPhone ![]() 首先,你设定的代理只能对 tcp 有效,所以有些解析有问题就无法走代理。你可以试试 socks5 另外 1# 是正解 |
3 arischow 2022-02-22 19:56:17 +08:00 ![]() ``` export https_proxy=http://127.0.0.1:8888;export http_proxy=http://127.0.0.1:8888;export all_proxy=socks5://127.0.0.1:8889 ``` |
4 arischow 2022-02-22 19:56:36 +08:00 或者用网关模式,让虚拟网卡接管所有流量再分流,如 1# |
![]() | 5 Immortal 2022-02-22 20:00:29 +08:00 ![]() 用 Clash 客户端举例: 1. Clash 设置全局并且全局 2. Clash 设置全局,然后在终端执行 export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 之后的命令都会走代理流量 |
![]() | 7 heywin 2022-02-22 20:22:42 +08:00 ![]() proxychains-ng |
8 Jiajin 2022-02-22 20:30:24 +08:00 增强模式就行了,不用开系统代理。 |
![]() | 9 AllenHua 2022-02-22 21:34:27 +08:00 ``` export http_proxy=http://USERNAME:[email protected]:7890 && export https_proxy=$http_proxy && export all_proxy=socks5://127.0.0.1:7890 && echo 'Set proxy successfully' ``` http(s)代理如果没有认证,那么命令如下 ``` export http_proxy=http://127.0.0.1:7890 && export https_proxy=$http_proxy && export all_proxy=socks5://127.0.0.1:7890 && echo 'Set proxy successfully' ``` unset 取消设置代理 ``` unset http_proxy && unset https_proxy && unset all_proxy && echo 'Unset proxy successfully' ``` socks5 代理没有认证,所以不用输入用户名和密码 |
![]() | 10 AllenHua 2022-02-22 21:38:22 +08:00 ![]() 你设置的 all_proxy 是 http 代理…… socks5 包含 https ,https 又包含 http socks5 代理工作在 osi 七层模型中的会话层(第五层),https/http 代理工作在 osi 七层模型的应用层(第七层),所以说 socks 代理更加底层。 |
![]() | 11 zalss 2022-02-22 21:40:31 +08:00 vim ~/.zshrc 插入这个: export ME="/Users/zalss" #你的目录 source $ME/.start.sh 新建~/.start.sh chmod -x ~/.start.sh ~/.start.sh 内容为: -------------------------------- export http="http://127.0.0.1:7890" export https=$http export socks5="socks5://127.0.0.1:7891" export reslove=" 开启代理 " export reject=" 已关闭! " alias mymac="neofetch" alias setp=" git config --global http.proxy $http; git config --global https.proxy $http; npm config set proxy $http; npm config set https-proxy $http; yarn config set proxy $http; yarn config set https-proxy $http; export ALL_PROXY=$socks5 export http_proxy=$http; export https_proxy=$http; echo -e '\033[32m $reslove \033[0m' " alias unsetp=" git config --global --unset http.proxy; git config --global --unset https.proxy; npm config delete proxy; npm config delete https-proxy; yarn config delete proxy; yarn config delete https-proxy; unset http_proxy; unset https_proxy unset ALL_PROXY echo -e '\033[31m $reject \033[0m' " alias ip="curl ipinfo.io" -------------------------------- |
![]() | 13 dingwen07 2022-02-23 02:36:51 +08:00 Clash for Windows TUN 模式 |
14 iseki 2022-02-23 02:57:26 +08:00 ![]() 不同软件对这几个环境变量的支持程度不一样,有的吃 all ,有的不吃;有的大小写不敏感,有的很敏感所以保险的方法是同时设定 http_proxy, https_proxy, all_proxy ,如果你有觉得不够可靠,对应的大写也设定一份,我观察的:吃 all 的不是很多 |
16 yhhsuf 2022-02-23 06:41:55 +08:00 proxifier |
![]() | 17 alexanderb 2022-02-23 07:26:00 +08:00 提供一个不太优雅的方案,proxychains 用 socks5 代理。 |
![]() | 18 Leonard 2022-02-23 09:31:01 +08:00 ClashX Pro 增强模式最方便 |
![]() | 19 Cump 2022-02-23 09:35:40 +08:00 如果 M1 芯片,QX 最方便 |
20 icetea12138 2022-02-23 09:38:18 +08:00 @Crump qx 不是手机上的嘛?电脑上也可以? |
![]() | 21 Crump 2022-02-23 09:44:52 +08:00 @icetea12138 可以,注意是 M1 系列芯片 |
22 xxb 2022-02-23 09:57:45 +08:00 via iPhone 7 楼和 17 楼可能是最优解,推荐 |
![]() | 23 xiaozhishang91 2022-02-23 11:23:52 +08:00 @xxb 同意。proxychains 是绝对可行的方案 |
![]() | 24 beginor 2022-02-23 11:32:33 +08:00 推荐用 Proxifier ,代理神器 |
![]() | 25 SenLief 2022-02-23 11:36:21 +08:00 via iPhone 全部用 tun 了 |
![]() | 26 EvilDevilJin 2022-02-23 12:03:25 +08:00 ![]() ClashX Pro export https_proxy=http://127.0.0.1:xxxx export http_proxy=http://127.0.0.1:xxxx export all_proxy=socks5://127.0.0.1:xxxx 写进~/.zshrc |
![]() | 27 Achieve7 2022-02-23 16:32:14 +08:00 ![]() alias proxy='env https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890' 执行命令的时候前面加上这一行 |
![]() | 28 tomychen 2022-02-23 16:58:16 +08:00 export 后 curl 会走代理,git 则不会 独立配置一下~/.gitconfig |
29 Huozy 2022-02-23 17:47:42 +08:00 把 export 直接写入 .zshrc 脚本里 |
![]() | 30 jfdnet 2022-02-23 18:23:23 +08:00 monterey 系统 用任何一个代理软件,应该都可以让所有 app 走代理了吧,而不仅仅是浏览器了,包括终端。 |
![]() | 31 lrvy 2022-02-23 19:26:59 +08:00 `sh pp () { if [ $switch_proxy = 0 ] then export http_proxy="$proxy_host:$proxy_http_port" export https_proxy="$proxy_host:$proxy_http_port" export all_proxy="$proxy_host:$proxy_socks5_port" export switch_proxy=1 echo -e "梯子模式" else unset http_proxy unset https_proxy unset all_proxy export switch_proxy=0 echo -e "和谐模式" fi } ` |
![]() | 32 jerryjhou 2022-02-24 08:40:12 +08:00 via iPad @icetea12138 最新版已做 M1 专门适配 |
![]() | 33 fuchun 2022-02-24 09:56:55 +08:00 如果 协议是 ssr 的话 |
![]() | 34 fuchun 2022-02-24 09:57:44 +08:00 如果 协议是 ssr 的话 可以用 Outline 参考 https://github.com/haoel/haoel.github.io#91-%E5%85%B6%E5%AE%83%E6%96%B9%E5%BC%8F |
35 devyjn 2022-02-24 15:54:46 +08:00 via Android echo socks5 = "127.0.0.1:1086" > ~/.curlrc |