How to run Psiphon from command line (to connect to a proxy server) and make it be applied to curl only (keeping other programs' connections un-proxy-ed)?
Purpose:
I'm using a script (written in perl) that uses curl by calling CMD command lines to perform web requests. I am looking for using Psiphon also via CMD command line, this way the script could call CMD command lines to connect to a server and use curl through Psiphon proxy.
Note:
I need Psiphon proxy to be working for curl only, keeping my other programs' connections normal as is.
My attempt for solution:
I've noticed that Psiphon uses an executable psiphon-tunnel-core.exe
. I tried to run this executable file from CMD it tells me {"data":{"data":{"message":"configuration file is required"},"noticeType":"Error","showUser":false,"timestamp":"2018-03-11T21:24:27.441Z"}
Open cmd
and type:
psiphon-tunnel-core.exe -help
You should be prompted the following:
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
I just like to add something from above. Since you need Psiphon proxy to be working for curl only, the easiest way is start Psiphon3 main application (whichever command you want), then use proxifier/proxycap/freecap/widecap...to control which application uses your local proxy, or just use curl' --proxy flag (ie --proxy 127.0.0.1:8080). Be sure you followed the SkipProxySettings registry instructions here: https://psiphon.ca/en/faq.html
For the cmd query, in https://github.com/Psiphon-Labs/psiphon-tunnel-core , there's a simple script to run the consoleclient (psiphon-tunnel-core). Try placing the "consoleclient" in the Psiphon3 "Roaming" folder and run it from there. Be sure that your http proxy port is the same as in the config file. Configuration infos are found here in case you need it: https://godoc.org/github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon#Config . The rest is all up to the user, but it's not recommended. (And even if this works, you still need to control the proxy for curl "only".)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.