【问题标题】:How to run Psiphon from CMD command line (for curl only)?如何从 CMD 命令行运行赛风(仅适用于 curl)?
【发布时间】:2018-03-14 23:27:30
【问题描述】:

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

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

注意:
我需要赛风代理只为 curl 工作,保持其他程序的连接正常。

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

【问题讨论】:

    标签: windows curl cmd proxy http-proxy


    【解决方案1】:

    我只是想从上面添加一些东西。由于您需要 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 中有一个简单的脚本来运行控制台客户端 (psiphon-tunnel-core)。尝试将“consoleclient”放在 Psiphon3“Roaming”文件夹中并从那里运行它。确保您的 http 代理端口与配置文件中的相同。如果您需要,可以在此处找到配置信息:https://godoc.org/github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon#Config。其余的完全取决于用户,但不建议这样做。 (即使这样可行,您仍然需要“仅”控制 curl 的代理。)

    【讨论】:

      【解决方案2】:

      打开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
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-08-19
        • 2015-07-01
        • 2021-11-19
        • 2018-11-08
        • 2013-04-30
        • 1970-01-01
        • 2023-03-17
        相关资源
        最近更新 更多