繁体   English   中英

如何从CMD命令行运行Psiphon(仅适用于curl)?

[英]How to run Psiphon from CMD command line (for curl only)?

如何从命令行运行Psiphon (以连接到代理服务器)并将其仅应用于curl(保持其他程序的连接不被代理)?

目的:
我正在使用一个脚本(用perl编写),该脚本通过调用CMD命令行执行Web请求来使用curl 我也在寻找通过CMD命令行使用Psiphon的方式,这种脚本可以调用CMD命令行连接到服务器并通过Psiphon代理使用curl。

注意:
我需要Psiphon代理仅适用于curl ,使其他程序的连接保持原样。

我的解决方案:
我注意到Psiphon使用了可执行的psiphon-tunnel-core.exe 我尝试从CMD运行此可执行文件,它告诉我{"data":{"data":{"message":"configuration file is required"},"noticeType":"Error","showUser":false,"timestamp":"2018-03-11T21:24:27.441Z"}

打开cmd并输入:

psiphon-tunnel-core.exe -help

应该提示您以下内容:

Usage of C:\Users\dell\Desktop\test\psiphon-tunnel-core.exe:
  -config string
        configuration input file
  -formatNotices
        emit notices in human-readable format
  -homepages string
        homepages notices output file
  -listenInterface string
        bind local proxies to specified interface
  -notices string
        notices output file (defaults to stderr)
  -rotating string
        rotating notices output file
  -rotatingFileSize int
        rotating notices file size (default 1048576)
  -rotatingSyncFrequency int
        rotating notices file sync frequency (default 100)
  -serverList string
        embedded server entry list input file
  -v    print build information and exit
  -version
        print build information and exit

我只想从上方添加一些内容。 由于您需要Psiphon代理仅适用于curl,因此最简单的方法是启动Psiphon3主应用程序(无论您要使用哪个命令),然后使用proxifier / proxycap / freecap / widecap ...来控制哪个应用程序使用您的本地代理,或者使用curl'--proxy标志(即--proxy 127.0.0.1:8080)。 确保您遵循此处的SkipProxySettings注册表说明: https ://psiphon.ca/en/faq.html

对于cmd查询,在https://github.com/Psiphon-Labs/psiphon-tunnel-core中 ,有一个简单的脚本可以运行consoleclient(psiphon-tunnel-core)。 尝试将“ consoleclient”放置在Psiphon3“ Roaming”文件夹中,然后从那里运行它。 确保您的http代理端口与配置文件中的端口相同。 如果需要,可在此处找到配置信息: https : //godoc.org/github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon#Config 其余的一切由用户决定,但不建议这样做。 (即使这可行,您仍然需要“仅”控制curl的代理。)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM