Skip to content

Commit

Permalink
Refactor therealproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Oct 24, 2019
1 parent f66ac59 commit b5aa298
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmd/apps/therealproxy-client/therealproxy-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"net"
"time"

"github.com/skycoin/skywire/pkg/app2"

"github.com/skycoin/dmsg/cipher"

"github.com/skycoin/skywire/internal/netutil"
Expand All @@ -21,14 +23,20 @@ const socksPort = 3
var r = netutil.NewRetrier(time.Second, 0, 1)

func main() {
log := app.NewLogger("socksproxy-client")
appName := "socksproxy-client"

log := app2.NewLogger(appName)
therealproxy.Log = log.PackageLogger("therealproxy")

var addr = flag.String("addr", ":1080", "Client address to listen on")
var serverPK = flag.String("srv", "", "PubKey of the server to connect to")
flag.Parse()

config := &app.Config{AppName: "socksproxy-client", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
config, err := app2.ClientConfigFromEnv()
if err != nil {
log.Fatalf("Error getting client config: %v\n", err)
}

socksApp, err := app.Setup(config)
if err != nil {
log.Fatal("Setup failure: ", err)
Expand Down

0 comments on commit b5aa298

Please sign in to comment.