diff options
author | Brandon Wiley <brandon@blanu.net> | 2016-12-11 14:16:24 -0500 |
---|---|---|
committer | Brandon Wiley <brandon@blanu.net> | 2016-12-11 14:16:24 -0500 |
commit | 3cdca46bc1bb9ce217bdb2ad3dd3433d4ed2a3b5 (patch) | |
tree | 0f823fd53abdd4e4bf57d3d7233d3d37817d9fd3 /transports | |
parent | d09ad1cb12a56d372170f51567409d0db2fbb42c (diff) |
Temporarily disabling all transports that have not yet been migrated to the PT 2.0 Go API
Diffstat (limited to 'transports')
-rw-r--r-- | transports/transports.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/transports/transports.go b/transports/transports.go index 3e9971d..fefda45 100644 --- a/transports/transports.go +++ b/transports/transports.go @@ -34,22 +34,17 @@ import ( "sync" "github.com/OperatorFoundation/shapeshifter-transports/transports/base" - "github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite" "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2" - "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs3" - "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4" - "github.com/OperatorFoundation/shapeshifter-transports/transports/scramblesuit" ) var transportMapLock sync.Mutex var transportMap map[string]base.Transport = make(map[string]base.Transport) // Register registers a transport protocol. -func Register(transport base.Transport) error { +func Register(name string, transport base.Transport) error { transportMapLock.Lock() defer transportMapLock.Unlock() - name := transport.Name() _, registered := transportMap[name] if registered { return fmt.Errorf("transport '%s' already registered", name) @@ -84,11 +79,7 @@ func Get(name string) base.Transport { // Init initializes all of the integrated transports. func Init() error { - Register(new(meeklite.Transport)) - Register(new(obfs2.Transport)) - Register(new(obfs3.Transport)) - Register(new(obfs4.Transport)) - Register(new(scramblesuit.Transport)) + Register("obfs2", obfs2.NewObfs2Transport()) return nil } |