diff --git a/accept.go b/accept.go index 5c92805..dc5a086 100644 --- a/accept.go +++ b/accept.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "fmt" @@ -44,7 +44,7 @@ func (c *Client) ListenI2P(dest string) (net.Listener, error) { return c, nil } -// Accept accepts a connection on a listening goSam.Client(Implements net.Listener) +// Accept accepts a connection on a listening gosam.Client(Implements net.Listener) // or, if the connection isn't listening yet, just calls AcceptI2P for compatibility // with older versions. func (c *Client) Accept() (net.Conn, error) { diff --git a/auth.go b/auth.go index a74a23f..8728dc9 100644 --- a/auth.go +++ b/auth.go @@ -1,4 +1,4 @@ -package goSam +package gosam import "fmt" diff --git a/auth/main.go b/auth/main.go index 9cd57fd..71a1786 100644 --- a/auth/main.go +++ b/auth/main.go @@ -4,22 +4,22 @@ import ( "fmt" "log" - "github.com/go-i2p/goSam" + "github.com/go-i2p/gosam" ) /** -THIS is a freestanding test for SAMv3.2 AUTH commands using goSam. It's +THIS is a freestanding test for SAMv3.2 AUTH commands using gosam. It's intended to be run separate from the other tests so that you don't accidentally end up setting SAM session passwords and leaving them in the PasswordManager if a test fails for some reason before you can remove them. **/ func main() { - client, err := goSam.NewClientFromOptions() + client, err := gosam.NewClientFromOptions() if err != nil { - client, err = goSam.NewClientFromOptions( - goSam.SetUser("user"), - goSam.SetPass("password"), + client, err = gosam.NewClientFromOptions( + gosam.SetUser("user"), + gosam.SetPass("password"), ) fmt.Println("Looks like you restarted the I2P router before sending AUTH DISABLE.") fmt.Println("This probably means that your SAM Bridge is in a broken state where it can't") @@ -36,7 +36,7 @@ func main() { if err != nil { log.Println(err) } - client2, err := goSam.NewDefaultClient() + client2, err := gosam.NewDefaultClient() if err != nil { log.Println(err) } diff --git a/client.go b/client.go index 419ee95..4e49d44 100644 --- a/client.go +++ b/client.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "bufio" @@ -15,7 +15,7 @@ import ( "time" "github.com/go-i2p/i2pkeys" - //samkeys "github.com/go-i2p/goSam/compat" + //samkeys "github.com/go-i2p/gosam/compat" ) // A Client represents a single Connection to the SAM bridge diff --git a/client_test.go b/client_test.go index 851ac51..03e47fc 100644 --- a/client_test.go +++ b/client_test.go @@ -1,7 +1,7 @@ //go:build nettest // +build nettest -package goSam +package gosam import "testing" diff --git a/conn.go b/conn.go index 497d54c..31c7f84 100644 --- a/conn.go +++ b/conn.go @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package goSam +package gosam import ( "log" diff --git a/datagram.go b/datagram.go index 5a0bdd5..0578901 100644 --- a/datagram.go +++ b/datagram.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "net" diff --git a/dest.go b/dest.go index 45dcb60..893dc45 100644 --- a/dest.go +++ b/dest.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "fmt" diff --git a/dial.go b/dial.go index f38c6dc..1c92085 100644 --- a/dial.go +++ b/dial.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "context" diff --git a/go.mod b/go.mod index f15bb00..8797e99 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/go-i2p/gosam go 1.20 require ( - github.com/eyedeekay/i2pkeys v0.33.0 github.com/getlantern/go-socks5 v0.0.0-20171114193258-79d4dd3e2db5 + github.com/go-i2p/i2pkeys v0.0.0-20241108200332-e4f5ccdff8c4 ) require ( @@ -18,7 +18,9 @@ require ( github.com/getlantern/ops v0.0.0-20200403153110-8476b16edcd6 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect + github.com/sirupsen/logrus v1.9.3 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect ) diff --git a/go.sum b/go.sum index fc8c066..e77d22f 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,6 @@ github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZx github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/eyedeekay/i2pkeys v0.33.0 h1:5SzUyWxNjV6AvYv/WaI8J4dSgAfv7/WEps6pDLe2YSs= -github.com/eyedeekay/i2pkeys v0.33.0/go.mod h1:W9KCm9lqZ+Ozwl3dwcgnpPXAML97+I8Jiht7o5A8YBM= github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4= github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY= github.com/getlantern/errors v1.0.1 h1:XukU2whlh7OdpxnkXhNH9VTLVz0EVPGKDV5K0oWhvzw= @@ -31,6 +29,8 @@ github.com/getlantern/netx v0.0.0-20211206143627-7ccfeb739cbd/go.mod h1:WEXF4pfI github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA= github.com/getlantern/ops v0.0.0-20200403153110-8476b16edcd6 h1:QthAQCekS1YOeYWSvoHI6ZatlG4B+GBDLxV/2ZkBsTA= github.com/getlantern/ops v0.0.0-20200403153110-8476b16edcd6/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA= +github.com/go-i2p/i2pkeys v0.0.0-20241108200332-e4f5ccdff8c4 h1:LRjaRCzg1ieGKZjELlaIg06Fx04RHzQLsWMYp1H6PQ4= +github.com/go-i2p/i2pkeys v0.0.0-20241108200332-e4f5ccdff8c4/go.mod h1:m5TlHjPZrU5KbTd7Lr+I2rljyC6aJ88HdkeMQXV0U0E= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -42,6 +42,8 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -71,6 +73,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/naming.go b/naming.go index 455a9e0..aaa7e14 100644 --- a/naming.go +++ b/naming.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "context" diff --git a/naming_test.go b/naming_test.go index 85336b3..1fe1a42 100644 --- a/naming_test.go +++ b/naming_test.go @@ -1,7 +1,7 @@ //go:build nettest // +build nettest -package goSam +package gosam import ( "fmt" diff --git a/options.go b/options.go index 5d078fa..52fd105 100644 --- a/options.go +++ b/options.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "fmt" diff --git a/options_test.go b/options_test.go index bffc0d3..b29323c 100644 --- a/options_test.go +++ b/options_test.go @@ -1,7 +1,7 @@ //go:build nettest // +build nettest -package goSam +package gosam import ( "fmt" diff --git a/raw.go b/raw.go index f03916b..a7c23c6 100644 --- a/raw.go +++ b/raw.go @@ -1 +1 @@ -package goSam +package gosam diff --git a/replyParser.go b/replyParser.go index d7e6d15..8035105 100644 --- a/replyParser.go +++ b/replyParser.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "fmt" diff --git a/replyParser_test.go b/replyParser_test.go index 2ee9da3..b3d013e 100644 --- a/replyParser_test.go +++ b/replyParser_test.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "testing" diff --git a/rw.go b/rw.go index 18d5460..82f6ae4 100644 --- a/rw.go +++ b/rw.go @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package goSam +package gosam import ( "encoding/hex" diff --git a/rwc.go b/rwc.go index 4327a0d..0cd3da9 100644 --- a/rwc.go +++ b/rwc.go @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package goSam +package gosam import ( "io" diff --git a/samsocks/main.go b/samsocks/main.go index aaadab2..a2f74ba 100644 --- a/samsocks/main.go +++ b/samsocks/main.go @@ -3,7 +3,7 @@ package main import ( "flag" - "github.com/go-i2p/goSam" + "github.com/go-i2p/gosam" "github.com/getlantern/go-socks5" "log" ) @@ -14,7 +14,7 @@ var ( ) func main() { - sam, err := goSam.NewClient(*samaddr) + sam, err := gosam.NewClient(*samaddr) if err != nil { panic(err) } diff --git a/sessions.go b/sessions.go index 51e073b..1628975 100644 --- a/sessions.go +++ b/sessions.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "fmt" diff --git a/stream.go b/stream.go index 10a6b43..81231a9 100644 --- a/stream.go +++ b/stream.go @@ -1,4 +1,4 @@ -package goSam +package gosam import ( "fmt"