add ability to query props

This commit is contained in:
idk
2019-04-25 23:55:04 -04:00
parent bd8dc655d1
commit 1b0c4ad512
2 changed files with 7 additions and 8 deletions

View File

@ -12,9 +12,9 @@ type Option func(*SAMHTTPProxy) error
//SetName sets a clients's address in the form host:port or host, port
func SetName(s string) func(*SAMHTTPProxy) error {
return func(c *SAMHTTPProxy) error {
c.tunName = s
return nil
}
c.tunName = s
return nil
}
}
//SetAddr sets a clients's address in the form host:port or host, port

View File

@ -17,7 +17,7 @@ import (
import (
"github.com/eyedeekay/goSam"
"github.com/eyedeekay/httptunnel/common"
"github.com/eyedeekay/sam-forwarder/i2pkeys"
"github.com/eyedeekay/sam-forwarder/i2pkeys"
)
type SAMHTTPProxy struct {
@ -25,8 +25,8 @@ type SAMHTTPProxy struct {
client *http.Client
transport *http.Transport
rateLimiter *rate.Limiter
tunName string
sigType string
tunName string
sigType string
proxyHost string
proxyPort string
SamHost string
@ -67,7 +67,7 @@ func plog(in ...interface{}) {
}
func (f *SAMHTTPProxy) print() []string {
return strings.Split(f.Print(), " ")
return strings.Split(f.Print(), " ")
}
func (f *SAMHTTPProxy) Props() map[string]string {
@ -79,7 +79,6 @@ func (f *SAMHTTPProxy) Props() map[string]string {
return r
}
func (p *SAMHTTPProxy) Cleanup() {
p.Close()
}