hmgle/graftcp

是否考虑给 blackip-file whiteip-file not-ignore-local 三个参数增加配置文件支持

Closed this issue · 3 comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
背景是在wsl2里使用,默认是走 http_proxy https_proxy 环境变量来使用代理,只有少数不支持这两个环境变量的程序才用graftcp,但就导致一个问题,如果不小心给支持环境变量的程序也用了graftcp,就会冲突,相当于graftcp连了代理后,程序自己又尝试连接代理的ip,此时一般的代理都会报错。这里把代理的ip加入到graftcp的blackip-file里就好了,但现在这个参数不支持放到配置文件里,每次都要输入,或者配置成alias,后者有在脚本里直接调用不生效的问题

Describe the solution you'd like
A clear and concise description of what you want to happen.
是否可以直接在配置文件中支持这些参数的配置?

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
自己写个wrapper脚本包一下graftcp和mgraftcp,加一下这两个参数,但不是很优雅。
现在是我自己简单改了一下mgraftcp的实现 ayanamist@27803ec

Additional context
Add any other context or screenshots about the feature request here.
还有一个场景,就是部分node程序,是部分支持上面说的环境变量的,就是http请求支持,但其余协议不支持,就导致无论用或者不用graftcp,都会不正常,所以必须使用graftcp的blackip能力。

hmgle commented

目前 graftcp 不支持读取配置。有空我再加一下读取配置的功能。

会有新的release嘛

hmgle commented

会有新的release嘛

会有,下一次 release 会包含进来。