mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00
Implement STDIOTunnel (#70)
This commit is contained in:
parent
edf63253df
commit
aa207764b2
4 changed files with 71 additions and 0 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/akamensky/argparse"
|
||||
"github.com/octeep/wireproxy"
|
||||
|
@ -116,6 +117,10 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
// Wireguard doesn't allow configuring which FD to use for logging
|
||||
// https://github.com/WireGuard/wireguard-go/blob/master/device/logger.go#L39
|
||||
// so redirect STDOUT to STDERR, we don't want to print anything to STDOUT anyways
|
||||
os.Stdout = os.NewFile(uintptr(syscall.Stderr), "/dev/stderr")
|
||||
logLevel := device.LogLevelVerbose
|
||||
if *silent {
|
||||
logLevel = device.LogLevelSilent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue