pufferffish / wireproxy

Wireguard client that exposes itself as a socks5 proxy
ISC License
4.54k stars 272 forks source link

can it run with command line #57

Open eve2ptp opened 1 year ago

eve2ptp commented 1 year ago

base some multithreading events, use subprocess with one line may avoid generating lots of config file. like ./wireproxy -privatekey <> -address <> -dns<> -publickey<> ...

eve2ptp commented 1 year ago

or use pipeline to read config

Mattwmaster58 commented 1 year ago

the library to parse ini files doesn't seem to support stdin as a an input path

oldwizard1010 commented 1 year ago

wireproxy -c <(echo "YOURCONFIGHERE")

mariuszste commented 1 year ago

the library to parse ini files doesn't seem to support stdin as a an input path

But we could just make wireproxy read stdin until EOF if - is passed as the config path and pass it as string/bytes (I don't knwo go) to the parser

on linux cat test.conf | wireproxy -c /dev/stdin seems to work fine

ltrivaldi322 commented 8 months ago

Any chance this could be done for Windows users? We can't use bash process substitution so if it doesn't read stdin until EOF there is nothing to do other than write out actual config files. Thanks!