
很多时候在终端需要设置代理,每次都要手动打开软件复制,所以 vibe 了一个命令行工具,会自动嗅探常用的代理软件,运行命令后会自动将环境变量写入剪切板,粘贴下就能运行,也支持了关闭、测试谷歌连接状态等。
主要自己用,说不定有人能用上。分享出来。
只在 mac 做了真机测试
curl -fsSL https://raw.githubusercontent.com/cj0x39e/p/main/install.sh | sh | Command | Purpose |
|---|---|
p | copy proxy env commands to clipboard |
p on | print shell commands to enable proxy |
p off | print shell commands to disable proxy |
p status | show detected proxy |
p detect | show detection details |
p test | test current proxy env with curl |
p set 7890 | save local HTTP proxy port |
p --shell sh | force output shell (sh, fish, ps) |
p --version | print version |
1 liangdi 1 月 15 日 我之前是用 shell function 搞的,确实可以做个见的程序来做,方便一些,我也去 vibe 一个 rust 的版本 |
2 lyxxxh2 1 月 15 日 这好鸡肋。 设置到全局路径,claude_run.bat ``` set http_proxy=http://127.0.0.1:9999 set https_proxy=http://127.0.0.1:9999 claude --dangerously-skip-permissions ``` |
3 ShineyWang 1 月 15 日 div class="reply_content">你用的 terminal 没有快捷命令吗?直接放工具栏了 ![]() 还有 Ctrl+R 没用过吗? |
4 Alias4ck 1 月 15 日 这种代理不应该是你代理软件做的吗. 为啥本末倒置了, 另外开 tun 模式不是完全解决这种问题吗 |
5 CloudMx 1 月 15 日 有我这个方便?/狗头 ``` alias FQ='export https_proxy=http://127.0.0.1:7898 http_proxy=http://127.0.0.1:7898 all_proxy=socks5://127.0.0.1:7898' alias BFQ='export https_proxy= http_proxy= all_proxy=' alias DL='export https_proxy=http://127.0.0.1:8080 http_proxy=http://127.0.0.1:8080' ``` |
9 taozhiw OP 看来大家都各有小妙招。主要是现在 vibe 成本低,这种小场景做成工具不费事 |
10 lemos1235 1 月 15 日 大炮打蚊子 |