Skip to content

Commit

Permalink
changed logging to a new liibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoSax committed Jul 27, 2020
1 parent d655047 commit e2d27e1
Show file tree
Hide file tree
Showing 40 changed files with 118 additions and 114 deletions.
4 changes: 2 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Changes in version 0.0.7 - 2016-11-15:
reduce memory consumption. Patch by oxtoacart.

Changes in version 0.0.6 - 2016-01-25:
- Delay transport factory initialization till after logging has been
- Delay transport factory initialization till after golog has been
initialized.
- Add a meek client implementation (WARNING: Does not support using a
helper to normalize TLS signatures). The brave people that want to use
Expand All @@ -22,7 +22,7 @@ Changes in version 0.0.5 - 2015-04-15:
- Changed the go.net import path to the new location (golang.org/x/net).
- Added limited support for detecting if the parent process crashes.
- Support for tor feature #15335 (stdin based termination notification).
- Moved the leveled logging wrappers into common/log so they are usable
- Moved the leveled golog wrappers into common/log so they are usable
in transport implementations.
- Added a DEBUG log level.
- Use a bundled SOCKS 5 server instead of goptlib's SocksListener.
Expand Down
10 changes: 5 additions & 5 deletions doc/obfs4proxy.1
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Display usage information and exit.
\fB\-\-version\fR
Display version information and exit.
.TP
\fB\-\-enableLogging\fR
Enable logging.
\fB\-\-enablegolog\fR
Enable golog.
.TP
\fB\-\-logLevel\fR=\fIlevel\fR
Specify the maximum log severity to log out of "\fBERROR\fR", "\fBWARN\fR",
"\fBINFO\fR", and "\fBDEBUG\fR".
.TP
\fB\-\-unsafeLogging\fR
Disable the IP address scrubber when logging, storing personally identifiable
\fB\-\-unsafegolog\fR
Disable the IP address scrubber when golog, storing personally identifiable
information in the logs.
.TP
\fB\-\-obfs4\-distBias\fR
Expand All @@ -45,7 +45,7 @@ Pluggable Transport Specification.
.PP
\fIDataDirectory\fR\fB/pt_state/obfs4proxy.log\fR
.RS 4
The log file, assuming logging is enabled.
The log file, assuming golog is enabled.
.RE
.PP
\fIDataDirectory\fR\fB/pt_state/obfs4_state.json\fR
Expand Down
4 changes: 2 additions & 2 deletions transports/Dust/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ github.com/blanu/Dust v1.0.1/go.mod h1:jLFQI2Ufz4kBnGiTzh8O9+/p4U/9MLbouXkaympnT
github.com/blanu/Dust/go/v2/interface v1.0.1 h1:lIQrNXljx8vgTTwB+gObrkA6jBhokmgH/uHp1OxbqxE=
github.com/blanu/Dust/go/v2/interface v1.0.1/go.mod h1:0NnpBd5fkRrG2I/pf6bcUaL5jpp84LeShsQzn4gCOCw=
github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/willscott/goturn v0.0.0-20170802220503-19f41278d0c9/go.mod h1:PfwRjodCaQXOsHnh2DeVaXqCFCIrbn5WLj1+A5bQkD4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
11 changes: 4 additions & 7 deletions transports/Dust/v3/Dust.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ package Dust

import (
"fmt"
"github.com/OperatorFoundation/obfs4/common/log"

//"github.com/OperatorFoundation/obfs4/common/log"
"github.com/op/go-logging"
"github.com/kataras/golog"
"golang.org/x/net/proxy"
"net"
"time"
Expand Down Expand Up @@ -71,14 +68,14 @@ type Transport struct {
Address string
Dialer proxy.Dialer
ServerConfig *dustServer
Log *logging.Logger
Log *golog.Logger
}

type Config struct {
ServerPublic string `json:"server-public"`
}

func New(serverPublic string, address string, dialer proxy.Dialer, serverConfig *dustServer, log *logging.Logger) Transport {
func New(serverPublic string, address string, dialer proxy.Dialer, serverConfig *dustServer, log *golog.Logger) Transport {
return Transport{
ServerPublic: serverPublic,
Address: address,
Expand Down Expand Up @@ -130,7 +127,7 @@ func (transport *dustClient) Dial(address string) (net.Conn, error) {
if err != nil {
closeErr := conn.Close()
if closeErr != nil {
log.Errorf("could not close")
golog.Error("could not close")
}
return conn, dialErr
}
Expand Down
4 changes: 2 additions & 2 deletions transports/Dust/v3/Dust_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package Dust


import (
"github.com/op/go-logging"
"github.com/kataras/golog"
"golang.org/x/net/proxy"
"testing"
)
Expand Down Expand Up @@ -87,7 +87,7 @@ func TestDust(t *testing.T) {

func TestDustV3(t *testing.T) {
//create a server
var log = logging.MustGetLogger("dust")
var log = golog.MustGetLogger("dust")
serverConfig := dustServer{
serverPrivkey: nil,
dialer: nil,
Expand Down
1 change: 1 addition & 0 deletions transports/Dust/v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ require (
github.com/OperatorFoundation/shapeshifter-ipc/v2 v2.0.0
github.com/blanu/Dust v1.0.1 // indirect
github.com/blanu/Dust/go/v2/interface v1.0.1
github.com/kataras/golog v0.0.18
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
)
5 changes: 5 additions & 0 deletions transports/Dust/v3/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ github.com/blanu/Dust v1.0.1/go.mod h1:jLFQI2Ufz4kBnGiTzh8O9+/p4U/9MLbouXkaympnT
github.com/blanu/Dust/go/v2/interface v1.0.1 h1:lIQrNXljx8vgTTwB+gObrkA6jBhokmgH/uHp1OxbqxE=
github.com/blanu/Dust/go/v2/interface v1.0.1/go.mod h1:0NnpBd5fkRrG2I/pf6bcUaL5jpp84LeShsQzn4gCOCw=
github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
github.com/kataras/golog v0.0.18 h1:Td7hcKN25yzqB/0SO5iohOsMk5Mq5V9kDtM5apaJLY0=
github.com/kataras/golog v0.0.18/go.mod h1:jRYl7dFYqP8aQj9VkwdBUXYZSfUktm+YYg1arJILfyw=
github.com/kataras/pio v0.0.8 h1:6pX6nHJk7DAV3x1dEimibQF2CmJLlo0jWVmM9yE9KY8=
github.com/kataras/pio v0.0.8/go.mod h1:NFfMp2kVP1rmV4N6gH6qgWpuoDKlrOeYi3VrAIWCGsE=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/willscott/goturn v0.0.0-20170802220503-19f41278d0c9/go.mod h1:PfwRjodCaQXOsHnh2DeVaXqCFCIrbn5WLj1+A5bQkD4=
Expand All @@ -22,5 +26,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
16 changes: 8 additions & 8 deletions transports/Optimizer/v3/Optimizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v3"
"github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v3"
"github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v3"
"github.com/op/go-logging"
"github.com/kataras/golog"
"golang.org/x/net/proxy"
"io/ioutil"
"net"
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestShadowDial(t *testing.T) {
}

func TestOptimizerShadowDial(t *testing.T) {
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &logging.Logger{})
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &golog.Logger{})
transports := []TransportDialer{&shadowTransport}
strategy := NewFirstStrategy(transports)
optimizerTransport := NewOptimizerClient(transports, strategy)
Expand All @@ -93,7 +93,7 @@ func TestOptimizerShadowDial(t *testing.T) {
}

func TestOptimizerObfs2Dial(t *testing.T) {
obfs2Transport := obfs2.New("127.0.0.1:1237", proxy.Direct, &logging.Logger{})
obfs2Transport := obfs2.New("127.0.0.1:1237", proxy.Direct, &golog.Logger{})
transports := []TransportDialer{obfs2Transport}
strategy := NewFirstStrategy(transports)
optimizerTransport := NewOptimizerClient(transports, strategy)
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestOptimizerTransportFirstDial(t *testing.T) {
IatMode: 0,
Address: "127.0.0.1:1234",
Dialer: dialer}
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &logging.Logger{})
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &golog.Logger{})
transports := []TransportDialer{obfs4Transport, &shadowTransport}
strategy := NewFirstStrategy(transports)
optimizerTransport := NewOptimizerClient(transports, strategy)
Expand All @@ -173,7 +173,7 @@ func TestOptimizerTransportRandomDial(t *testing.T) {
Address: "127.0.0.1:1234",
Dialer: dialer,
}
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &logging.Logger{})
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &golog.Logger{})
transports := []TransportDialer{obfs4Transport, &shadowTransport}
strategy := NewRandomStrategy(transports)
optimizerTransport := NewOptimizerClient(transports, strategy)
Expand All @@ -199,7 +199,7 @@ func TestOptimizerTransportRotateDial(t *testing.T) {
Address: "127.0.0.1:1234",
Dialer: dialer,
}
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &logging.Logger{})
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &golog.Logger{})
transports := []TransportDialer{obfs4Transport, &shadowTransport}
strategy := NewRotateStrategy(transports)
optimizerTransport := NewOptimizerClient(transports, strategy)
Expand All @@ -225,7 +225,7 @@ func TestOptimizerTransportTrackDial(t *testing.T) {
Address: "127.0.0.1:1234",
Dialer: dialer,
}
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &logging.Logger{})
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &golog.Logger{})
transports := []TransportDialer{obfs4Transport, &shadowTransport}
strategy := NewTrackStrategy(transports)
optimizerTransport := NewOptimizerClient(transports, strategy)
Expand All @@ -251,7 +251,7 @@ func TestOptimizerTransportMinimizeDialDurationDial(t *testing.T) {
Address: "127.0.0.1:1234",
Dialer: dialer,
}
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &logging.Logger{})
shadowTransport := shadow.NewTransport("1234", "CHACHA20-IETF-POLY1305", "127.0.0.1:1235", &golog.Logger{})
transports := []TransportDialer{obfs4Transport, &shadowTransport}
strategy := NewMinimizeDialDuration(transports)
optimizerTransport := NewOptimizerClient(transports, strategy)
Expand Down
2 changes: 1 addition & 1 deletion transports/Optimizer/v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ require (
github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v3 v3.0.6
github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v3 v3.0.6
github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v3 v3.0.6
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/kataras/golog v0.0.18
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
)
4 changes: 4 additions & 0 deletions transports/Optimizer/v3/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmH
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4=
github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
github.com/kataras/golog v0.0.18 h1:Td7hcKN25yzqB/0SO5iohOsMk5Mq5V9kDtM5apaJLY0=
github.com/kataras/golog v0.0.18/go.mod h1:jRYl7dFYqP8aQj9VkwdBUXYZSfUktm+YYg1arJILfyw=
github.com/kataras/pio v0.0.8 h1:6pX6nHJk7DAV3x1dEimibQF2CmJLlo0jWVmM9yE9KY8=
github.com/kataras/pio v0.0.8/go.mod h1:NFfMp2kVP1rmV4N6gH6qgWpuoDKlrOeYi3VrAIWCGsE=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/shadowsocks/go-shadowsocks2 v0.0.11 h1:dXloqEhYnZV40jblWTK8kWeC0Eb+dgql4S0tj99e8j0=
Expand Down
10 changes: 5 additions & 5 deletions transports/Replicant/v3/Optimizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ package replicant

import (
pt "github.com/OperatorFoundation/shapeshifter-ipc/v2"
"github.com/op/go-logging"
"github.com/kataras/golog"
"golang.org/x/net/proxy"
"net"
)
Expand All @@ -36,17 +36,17 @@ type TransportClient struct {
Config ClientConfig
Address string
Dialer proxy.Dialer
Log *logging.Logger
Log *golog.Logger
}

type TransportServer struct {
Config ServerConfig
Address string
Dialer proxy.Dialer
Log *logging.Logger
Log *golog.Logger
}

func NewClient(config ClientConfig, address string, dialer proxy.Dialer, log *logging.Logger) TransportClient {
func NewClient(config ClientConfig, address string, dialer proxy.Dialer, log *golog.Logger) TransportClient {
return TransportClient{
Config: config,
Address: address,
Expand All @@ -55,7 +55,7 @@ func NewClient(config ClientConfig, address string, dialer proxy.Dialer, log *lo
}
}

func NewServer(config ServerConfig, address string, dialer proxy.Dialer, log *logging.Logger) TransportServer {
func NewServer(config ServerConfig, address string, dialer proxy.Dialer, log *golog.Logger) TransportServer {
return TransportServer{
Config: config,
Address: address,
Expand Down
1 change: 0 additions & 1 deletion transports/Replicant/v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.12
require (
github.com/OperatorFoundation/monolith-go/monolith v1.0.4
github.com/OperatorFoundation/shapeshifter-ipc/v2 v2.0.0
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/opentracing/opentracing-go v1.1.0
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
Expand Down
4 changes: 2 additions & 2 deletions transports/Replicant/v3/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/OperatorFoundation/shapeshifter-ipc/v2 v2.0.0 h1:6aQs+TF3KULMarpzbKu8
github.com/OperatorFoundation/shapeshifter-ipc/v2 v2.0.0/go.mod h1:gb/QiZH0QDXLSQ9PskyJ2oTflB7tsP4AYc8y+FppvB0=
github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ=
github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
Expand Down
6 changes: 3 additions & 3 deletions transports/Replicant/v3/replicant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/OperatorFoundation/monolith-go/monolith"
"github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v3/polish"
"github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v3/toneburst"
"github.com/op/go-logging"
"github.com/kataras/golog"
"golang.org/x/net/proxy"
"io/ioutil"
"math/rand"
Expand Down Expand Up @@ -184,7 +184,7 @@ func runReplicantServer() {
}

func runReplicantFactoryServer() {
var log = logging.MustGetLogger("replicant")
var log = golog.MustGetLogger("replicant")
serverStarted := make(chan bool)
addr := "127.0.0.1:3001"

Expand Down Expand Up @@ -304,7 +304,7 @@ func replicantConnection(clientConfig ClientConfig, serverConfig ServerConfig, t

func replicantFactoryConnection(clientConfig ClientConfig, serverConfig ServerConfig, t *testing.T) {
serverStarted := make(chan bool)
var log = logging.MustGetLogger("replicant")
var log = golog.MustGetLogger("replicant")
// Get a random port
rand.Seed(time.Now().UnixNano())
min := 1025
Expand Down
2 changes: 1 addition & 1 deletion transports/meeklite/v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite
go 1.12

require (
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7

golang.org/x/net v0.0.0-20200202094626-16171245cfb2
)
4 changes: 2 additions & 2 deletions transports/meeklite/v3/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down
6 changes: 3 additions & 3 deletions transports/meeklite/v3/meeklite.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/op/go-logging"
"github.com/kataras/golog"
"golang.org/x/net/proxy"
"io"
"io/ioutil"
Expand Down Expand Up @@ -128,7 +128,7 @@ type Transport struct {
Front string `json:"front"`
Address string
Dialer proxy.Dialer
log *logging.Logger
log *golog.Logger
}

//Config puts the parameters in a json compatible format
Expand All @@ -137,7 +137,7 @@ type Config struct {
Front string `json:"front"`
}

func NewMeekFactoryTransportWithFront(url *gourl.URL, front string, address string, dialer proxy.Dialer, log *logging.Logger) *Transport {
func NewMeekFactoryTransportWithFront(url *gourl.URL, front string, address string, dialer proxy.Dialer, log *golog.Logger) *Transport {
return &Transport{url, front, address,dialer, log}
}
// Dial creates outgoing transport connection
Expand Down
4 changes: 2 additions & 2 deletions transports/meeklite/v3/meeklite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
package meeklite

import (
"github.com/op/go-logging"
"github.com/kataras/golog"
"golang.org/x/net/proxy"
gourl "net/url"
"testing"
Expand Down Expand Up @@ -79,7 +79,7 @@ func TestMeeklite(t *testing.T) {
}

func TestFactoryMeeklite(t *testing.T) {
var log = logging.MustGetLogger("meeklite")
var log = golog.MustGetLogger("meeklite")
//create a server
urlString := "https://transport-canary-meek.appspot.com/"
Url, err := gourl.Parse(urlString)
Expand Down
2 changes: 1 addition & 1 deletion transports/meekserver/v2/meek-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (a scrubbedAddr) String() string {
return "[scrubbed]"
}

// Replace the Addr in a net.OpError with "[scrubbed]" for logging.
// Replace the Addr in a net.OpError with "[scrubbed]" for golog.
func scrubError(err error) error {
if operr, ok := err.(*net.OpError); ok {
// net.OpError contains Op, Net, Addr, and a subsidiary Err. The
Expand Down
2 changes: 1 addition & 1 deletion transports/meekserver/v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.12
require (
github.com/deckarep/golang-set v1.7.1
github.com/mufti1/interconv v0.0.0-20190313040840-d7c72925c656
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7

golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
)
Loading

0 comments on commit e2d27e1

Please sign in to comment.