dialer stuff
This commit is contained in:
parent
4de0e46616
commit
0561651085
2 changed files with 5 additions and 5 deletions
|
@ -87,10 +87,10 @@ func (m Conn) Cleanup() error {
|
||||||
return nil
|
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 c Conn
|
||||||
var err error
|
var err error
|
||||||
c.SAM = sam
|
c.SAM = &sam
|
||||||
c.path = path
|
c.path = path
|
||||||
t32, err := sam3.NewI2PAddrFromString(addr)
|
t32, err := sam3.NewI2PAddrFromString(addr)
|
||||||
c.name = t32.Base32() + ".i2pkeys"
|
c.name = t32.Base32() + ".i2pkeys"
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
import (
|
import (
|
||||||
"github.com/eyedeekay/eeproxy/conn"
|
"github.com/eyedeekay/eeproxy/conn"
|
||||||
"github.com/eyedeekay/eeproxy/resolve"
|
"github.com/eyedeekay/eeproxy/resolve"
|
||||||
//"github.com/eyedeekay/eeproxy/rewriter"
|
"github.com/eyedeekay/eeproxy/rewriter"
|
||||||
"github.com/eyedeekay/go-socks5"
|
"github.com/eyedeekay/go-socks5"
|
||||||
"github.com/eyedeekay/sam3"
|
"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)
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ func NewManagerFromOptions(opts ...func(*Manager) error) (*Manager, error) {
|
||||||
m.Config = socks5.Config{
|
m.Config = socks5.Config{
|
||||||
Resolver: r,
|
Resolver: r,
|
||||||
Dial: m.Dial,
|
Dial: m.Dial,
|
||||||
//Rewriter: rewriter.NewRewriter(),
|
Rewriter: rewriter.NewRewriter(),
|
||||||
}
|
}
|
||||||
return &m, nil
|
return &m, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue