change sam3 to i2pkeys in some places
This commit is contained in:
parent
a17ef742a2
commit
4ad3e7d4a0
8 changed files with 435 additions and 23 deletions
|
@ -6,7 +6,8 @@ import (
|
|||
)
|
||||
import (
|
||||
"github.com/eyedeekay/go-socks5"
|
||||
"github.com/eyedeekay/sam3"
|
||||
// "github.com/go-i2p/sam3"
|
||||
"github.com/go-i2p/i2pkeys"
|
||||
)
|
||||
|
||||
type Rewriter struct {
|
||||
|
@ -15,8 +16,8 @@ type Rewriter struct {
|
|||
|
||||
func (r Rewriter) Rewrite(ctx context.Context, request *socks5.Request) (context.Context, *socks5.AddrSpec) {
|
||||
var addr *socks5.AddrSpec
|
||||
switch request.DestAddr.ADDR.(type) {
|
||||
case *sam3.I2PAddr:
|
||||
switch request.DestAddr.Addr.(type) {
|
||||
case *i2pkeys.I2PAddr:
|
||||
addr = request.DestAddr
|
||||
//addr.FQDN = request.DestAddr.ADDR.(*sam3.I2PAddr).Base32()
|
||||
log.Println("Checking FQDN", addr.FQDN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue