mirror of
https://github.com/go-i2p/onramp.git
synced 2025-09-17 22:47:50 -04:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
daeaa91183 | ||
![]() |
ed7e6f56ae | ||
![]() |
982a496406 | ||
![]() |
d7abd8af30 | ||
![]() |
0d05b3c3f7 |
@@ -12,7 +12,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/eyedeekay/onramp"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -44,7 +44,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/eyedeekay/onramp"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -135,7 +135,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/eyedeekay/onramp"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -167,7 +167,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/eyedeekay/onramp"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
4
Makefile
4
Makefile
@@ -1,6 +1,6 @@
|
||||
|
||||
USER_GH=eyedeekay
|
||||
VERSION=0.33.9
|
||||
USER_GH=go-i2p
|
||||
VERSION=0.33.92
|
||||
CREDIT='contributors to this release: @hkh4n, @eyedeekay'
|
||||
packagename=onramp
|
||||
|
||||
|
10
README.md
10
README.md
@@ -1,6 +1,8 @@
|
||||
onramp
|
||||
======
|
||||
|
||||
[](https://goreportcard.com/report/github.com/go-i2p/onramp)
|
||||
|
||||
High-level, easy-to-use listeners and clients for I2P and onion URL's from Go.
|
||||
Provides only the most widely-used functions in a basic way. It expects nothing
|
||||
from the users, an otherwise empty instance of the structs will listen and dial
|
||||
@@ -12,9 +14,9 @@ This means that hidden services will maintain their identities, and that clients
|
||||
will always have the same return addresses. If you don't want this behavior,
|
||||
make sure to delete the "keystore" when your app closes or when your application
|
||||
needs to cycle keys by calling the `Garlic.DeleteKeys()` or `Onion.DeleteKeys()`
|
||||
function. For more information, check out the [godoc](http://pkg.go.dev/github.com/eyedeekay/onramp).
|
||||
function. For more information, check out the [godoc](http://pkg.go.dev/github.com/go-i2p/onramp).
|
||||
|
||||
- **[Source Code](https://github.com/eyedeekay/onramp)**
|
||||
- **[Source Code](https://github.com/go-i2p/onramp)**
|
||||
|
||||
STATUS: This project is maintained. I will respond to issues, pull requests, and feature requests within a few days.
|
||||
|
||||
@@ -38,7 +40,7 @@ package main
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/eyedeekay/onramp"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -64,7 +66,7 @@ package main
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/eyedeekay/onramp"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
13
common.go
13
common.go
@@ -4,12 +4,13 @@
|
||||
package onramp
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"net"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//go:generate go run -tags gen ./gen.go
|
||||
@@ -18,23 +19,23 @@ import (
|
||||
func GetJoinedWD(dir string) (string, error) {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Failed to get working directory")
|
||||
//log.WithError(err).Error("Failed to get working directory")
|
||||
return "", err
|
||||
}
|
||||
jwd := filepath.Join(wd, dir)
|
||||
ajwd, err := filepath.Abs(jwd)
|
||||
if err != nil {
|
||||
log.WithError(err).WithField("path", jwd).Error("Failed to get absolute path")
|
||||
//log.WithError(err).WithField("path", jwd).Error("Failed to get absolute path")
|
||||
return "", err
|
||||
}
|
||||
if _, err := os.Stat(ajwd); err != nil {
|
||||
log.WithField("path", ajwd).Debug("Directory does not exist, creating")
|
||||
//log.WithField("path", ajwd).Debug("Directory does not exist, creating")
|
||||
if err := os.MkdirAll(ajwd, 0755); err != nil {
|
||||
log.WithError(err).WithField("path", ajwd).Error("Failed to create directory")
|
||||
//log.WithError(err).WithField("path", ajwd).Error("Failed to create directory")
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
log.WithField("path", ajwd).Debug("Successfully got joined working directory")
|
||||
//log.WithField("path", ajwd).Debug("Successfully got joined working directory")
|
||||
return ajwd, nil
|
||||
}
|
||||
|
||||
|
@@ -7,12 +7,13 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/go-i2p/i2pkeys"
|
||||
"github.com/go-i2p/sam3"
|
||||
)
|
||||
|
@@ -2,10 +2,14 @@ package onramp
|
||||
|
||||
import "github.com/go-i2p/sam3"
|
||||
|
||||
var OPT_DEFAULTS = sam3.Options_Default
|
||||
var OPT_WIDE = sam3.Options_Wide
|
||||
var (
|
||||
OPT_DEFAULTS = sam3.Options_Default
|
||||
OPT_WIDE = sam3.Options_Wide
|
||||
)
|
||||
|
||||
var OPT_HUGE = sam3.Options_Humongous
|
||||
var OPT_LARGE = sam3.Options_Large
|
||||
var OPT_MEDIUM = sam3.Options_Medium
|
||||
var OPT_SMALL = sam3.Options_Small
|
||||
var (
|
||||
OPT_HUGE = sam3.Options_Humongous
|
||||
OPT_LARGE = sam3.Options_Large
|
||||
OPT_MEDIUM = sam3.Options_Medium
|
||||
OPT_SMALL = sam3.Options_Small
|
||||
)
|
||||
|
4
go.mod
4
go.mod
@@ -11,7 +11,7 @@ require (
|
||||
|
||||
require (
|
||||
github.com/stretchr/testify v1.8.4 // indirect
|
||||
golang.org/x/crypto v0.11.0 // indirect
|
||||
golang.org/x/net v0.12.0 // indirect
|
||||
golang.org/x/crypto v0.29.0 // indirect
|
||||
golang.org/x/net v0.31.0 // indirect
|
||||
golang.org/x/sys v0.27.0 // indirect
|
||||
)
|
||||
|
6
go.sum
6
go.sum
@@ -3,9 +3,7 @@ github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbe
|
||||
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/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-i2p/i2pkeys v0.33.9/go.mod h1:Apt0rKbwylG37GoTAmovuJvB4lu0yFM2sgfIUefbMK8=
|
||||
github.com/go-i2p/i2pkeys v0.33.10-0.20241113193422-e10de5e60708 h1:Tiy9IBwi21maNpK74yCdHursJJMkyH7w87tX1nXGWzg=
|
||||
github.com/go-i2p/i2pkeys v0.33.10-0.20241113193422-e10de5e60708/go.mod h1:m5TlHjPZrU5KbTd7Lr+I2rljyC6aJ88HdkeMQXV0U0E=
|
||||
github.com/go-i2p/sam3 v0.33.9 h1:3a+gunx75DFc6jxloUZTAVJbdP6736VU1dy2i7I9fKA=
|
||||
@@ -21,10 +19,14 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
|
||||
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
||||
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
|
||||
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
|
||||
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
|
||||
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
3
log.go
3
log.go
@@ -1,11 +1,12 @@
|
||||
package onramp
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var (
|
||||
|
3
onion.go
3
onion.go
@@ -7,11 +7,12 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/cretz/bine/tor"
|
||||
"github.com/cretz/bine/torutil/ed25519"
|
||||
)
|
||||
|
3
proxy.go
3
proxy.go
@@ -1,10 +1,11 @@
|
||||
package onramp
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type OnrampProxy struct {
|
||||
|
Reference in New Issue
Block a user