dialer stuff

This commit is contained in:
idk 2018-12-26 00:23:20 -05:00
parent 4de0e46616
commit 0561651085
No known key found for this signature in database
GPG key ID: D75C03B39B5E14E1
2 changed files with 5 additions and 5 deletions

View file

@ -87,10 +87,10 @@ func (m Conn) Cleanup() error {
return nil
}
func NewConn(sam *sam3.SAM, addr, path string, opts []string) (*Conn, error) {
func NewConn(sam sam3.SAM, addr, path string, opts []string) (*Conn, error) {
var c Conn
var err error
c.SAM = sam
c.SAM = &sam
c.path = path
t32, err := sam3.NewI2PAddrFromString(addr)
c.name = t32.Base32() + ".i2pkeys"

View file

@ -10,7 +10,7 @@ import (
import (
"github.com/eyedeekay/eeproxy/conn"
"github.com/eyedeekay/eeproxy/resolve"
//"github.com/eyedeekay/eeproxy/rewriter"
"github.com/eyedeekay/eeproxy/rewriter"
"github.com/eyedeekay/go-socks5"
"github.com/eyedeekay/sam3"
)
@ -51,7 +51,7 @@ func (m Manager) DialI2P(ctx context.Context, addr string) (*sam3.SAMConn, error
}
}
log.Println("Creating a new connection in connection tree.", m.datadir)
newconn, err := conn.NewConn(m.SAM, addr, m.datadir, m.samopts)
newconn, err := conn.NewConn(*m.SAM, addr, m.datadir, m.samopts)
if err != nil {
return nil, err
}
@ -107,7 +107,7 @@ func NewManagerFromOptions(opts ...func(*Manager) error) (*Manager, error) {
m.Config = socks5.Config{
Resolver: r,
Dial: m.Dial,
//Rewriter: rewriter.NewRewriter(),
Rewriter: rewriter.NewRewriter(),
}
return &m, nil
}