Compare commits
43 Commits
Author | SHA1 | Date | |
---|---|---|---|
7048131842 | |||
b47b3971f7 | |||
e31a7636d0 | |||
9b05750814 | |||
494f0274ba | |||
a079a9c9ff | |||
fa15eeec97 | |||
d5422aee75 | |||
4232b6e197 | |||
fcdd8b7f52 | |||
529a5f77cb | |||
8be5dfbee0 | |||
87e663ed3d | |||
ff11aeebc4 | |||
8e0af0c4f6 | |||
3ab932c170 | |||
6159dc47f0 | |||
bf6b920eff | |||
aa52be69ff | |||
d2f767dbe0 | |||
b89d62e481 | |||
06113918ea | |||
a884fa4692 | |||
fc36f9cf6f | |||
3248dd789d | |||
71ca8cd65f | |||
60e9f15b18 | |||
ee8617deb0 | |||
029317222e | |||
bcd32aa8ad | |||
3c1a44e1d2 | |||
7167ba3a1c | |||
3ff494c374 | |||
aebbe18f3b | |||
081b25d54c | |||
78306cc9e6 | |||
0e40939f7d | |||
ccc29b5e66 | |||
36655256c3 | |||
efccedaafb | |||
a75baf9db7 | |||
d67c0c0e31 | |||
e88e3a0a6b |
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,3 +4,6 @@ bin/*
|
||||
*.i2pkeys
|
||||
*/*.i2pkeys
|
||||
README.md.asc
|
||||
samcatd
|
||||
*/*.pem
|
||||
*.pem
|
||||
|
33
Makefile
33
Makefile
@ -17,7 +17,7 @@ LOG := log/
|
||||
ETC := etc/
|
||||
USR := usr/
|
||||
LOCAL := local/
|
||||
VERSION := 0.32.02
|
||||
VERSION := 0.32.09
|
||||
|
||||
GO111MODULE=on
|
||||
|
||||
@ -25,8 +25,12 @@ echo:
|
||||
@echo "$(GOPATH)"
|
||||
find . -path ./.go -prune -o -name "*.go" -exec gofmt -w {} \;
|
||||
find . -path ./.go -prune -o -name "*.i2pkeys" -exec rm {} \;
|
||||
find . -path ./.go -prune -o -name "*.pem" -exec rm {} \;
|
||||
find . -path ./.go -prune -o -name "*.go" -exec cat {} \; | nl
|
||||
|
||||
tag:
|
||||
gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(packagename) -t v$(VERSION) -d "I2P Tunnel Management tool for Go applications"
|
||||
|
||||
recopy:
|
||||
#find ./tcp/ -name '*.go' -exec cp -rv {} . \;
|
||||
#sed -i '1s|^|//AUTO-GENERATED FOR BACKWARD COMPATIBILITY, USE ./tcp in the future\n|' *.go
|
||||
@ -37,7 +41,7 @@ fix-debian:
|
||||
find ./debian -type f -exec sed -i 's|eyedeekay@safe-mail.net|hankhill19580@gmail.com|g' {} \;
|
||||
|
||||
try:
|
||||
cd etc/samcatd/ && ../../bin/samcatd -f tunnels.ini
|
||||
./bin/samcatd -f etc/samcatd/tunnels.ini
|
||||
|
||||
test: test-keys test-ntcp test-ssu test-config test-manager
|
||||
|
||||
@ -85,6 +89,15 @@ daemon: clean-daemon bin/$(samcatd)
|
||||
|
||||
daemon-webview: bin/$(samcatd)-webview
|
||||
|
||||
daemon-cli: bin/$(samcatd)-cli
|
||||
|
||||
bin/$(samcatd)-cli:
|
||||
mkdir -p bin
|
||||
cd samcatd && go build -a -tags "netgo cli" \
|
||||
-ldflags '-w -extldflags "-static"' \
|
||||
-o ../bin/$(samcatd)-cli \
|
||||
./*.go
|
||||
|
||||
bin/$(samcatd):
|
||||
mkdir -p bin
|
||||
cd samcatd && go build -a -tags "netgo static" \
|
||||
@ -101,9 +114,9 @@ bin/$(samcatd)-webview:
|
||||
update:
|
||||
git config --global url."git@github.com:RTradeLtd".insteadOf "https://github.com/RTradeLtd"
|
||||
|
||||
all: daemon daemon-webview
|
||||
all: daemon-cli daemon daemon-webview
|
||||
|
||||
clean: clean-all
|
||||
clean: clean-all echo
|
||||
|
||||
clean-all: clean-daemon
|
||||
|
||||
@ -150,6 +163,7 @@ key-management:
|
||||
example-config:
|
||||
@echo "example config - valid for both ephsite and samcat" >> USAGE.md
|
||||
@echo "==================================================" >> USAGE.md
|
||||
@echo "" >> USAGE.md
|
||||
@echo "Options are still being added, pretty much as fast as I can put them" >> USAGE.md
|
||||
@echo "in. For up-to-the-minute options, see [the checklist](config/CHECKLIST.md)" >> USAGE.md
|
||||
@echo "" >> USAGE.md
|
||||
@ -224,9 +238,14 @@ tar:
|
||||
--exclude bin \
|
||||
-cJvf ../$(packagename)_$(VERSION).orig.tar.xz .
|
||||
|
||||
tag:
|
||||
gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(packagename) -t v$(VERSION) -d "I2P Tunnel Management tool for Go applications"
|
||||
|
||||
sed:
|
||||
sed -i 's|func(\*Conf)|func(samtunnel.SAMTunnel)|g' ./config/*.go
|
||||
sed -i 's|func(c \*Conf)|func(c samtunnel.SAMTunnel)|g' ./config/*.go
|
||||
|
||||
tasks:
|
||||
golint ./tcp
|
||||
#golint ./udp
|
||||
#golint ./config
|
||||
#golint ./config
|
||||
#golint ./config
|
||||
#golint ./config
|
||||
|
@ -58,12 +58,12 @@ key:
|
||||
[*] - i2cp.tcp.port 1-65535 7654 Router I2CP port. If the client is running in the same JVM as a router, this option is ignored, and the client connects to that router internally.
|
||||
|
||||
Default Description
|
||||
[C] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blacklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a whitelist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[C] - i2cp.enableAccessList false Use the access list as a whitelist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.enableBlackList false Use the access list as a blacklist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blocklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a allowlist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[C] - i2cp.enableAccessList false Use the access list as a allowlist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.enableBlackList false Use the access list as a blocklist for incoming connections. As of release 0.7.13.
|
||||
[U] - i2p.streaming.answerPings true Whether to respond to incoming pings
|
||||
[U] - i2p.streaming.blacklist null Comma- or space-separated list of Base64 peer Hashes to be blacklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.blocklist null Comma- or space-separated list of Base64 peer Hashes to be blocklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.bufferSize 64K How much transmit data (in bytes) will be accepted that hasn't been written out yet.
|
||||
[U] - i2p.streaming.congestionAvoidanceGrowthRateFactor 1 When we're in congestion avoidance, we grow the window size at the rate of 1/(windowSize*factor). In standard TCP, window sizes are in bytes, while in I2P, window sizes are in messages. A higher number means slower growth.
|
||||
[U] - i2p.streaming.connectDelay -1 How long to wait after instantiating a new con before actually attempting to connect. If this is <= 0, connect immediately with no initial data. If greater than 0, wait until the output stream is flushed, the buffer fills, or that many milliseconds pass, and include any initial data with the SYN.
|
||||
|
@ -55,12 +55,12 @@ key:
|
||||
[U] - i2cp.tcp.port 1-65535 7654 Router I2CP port. If the client is running in the same JVM as a router, this option is ignored, and the client connects to that router internally.
|
||||
|
||||
Default Description
|
||||
[U] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blacklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a whitelist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[U] - i2cp.enableAccessList false Use the access list as a whitelist for incoming connections. As of release 0.7.13.
|
||||
[U] - i2cp.enableBlackList false Use the access list as a blacklist for incoming connections. As of release 0.7.13.
|
||||
[U] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blocklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a allowlist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[U] - i2cp.enableAccessList false Use the access list as a allowlist for incoming connections. As of release 0.7.13.
|
||||
[U] - i2cp.enableBlackList false Use the access list as a blocklist for incoming connections. As of release 0.7.13.
|
||||
[U] - i2p.streaming.answerPings true Whether to respond to incoming pings
|
||||
[U] - i2p.streaming.blacklist null Comma- or space-separated list of Base64 peer Hashes to be blacklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.blocklist null Comma- or space-separated list of Base64 peer Hashes to be blocklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.bufferSize 64K How much transmit data (in bytes) will be accepted that hasn't been written out yet.
|
||||
[U] - i2p.streaming.congestionAvoidanceGrowthRateFactor 1 When we're in congestion avoidance, we grow the window size at the rate of 1/(windowSize*factor). In standard TCP, window sizes are in bytes, while in I2P, window sizes are in messages. A higher number means slower growth.
|
||||
[U] - i2p.streaming.connectDelay -1 How long to wait after instantiating a new con before actually attempting to connect. If this is <= 0, connect immediately with no initial data. If greater than 0, wait until the output stream is flushed, the buffer fills, or that many milliseconds pass, and include any initial data with the SYN.
|
||||
|
@ -22,20 +22,20 @@ func (c *Conf) GetAccessListType(arg, def string, label ...string) string {
|
||||
func (c *Conf) SetAccessListType(label ...string) {
|
||||
if v, ok := c.GetBool("i2cp.enableBlackList", label...); ok {
|
||||
if v {
|
||||
c.AccessListType = "blacklist"
|
||||
c.AccessListType = "blocklist"
|
||||
}
|
||||
}
|
||||
if v, ok := c.GetBool("i2cp.enableAccessList", label...); ok {
|
||||
if v {
|
||||
c.AccessListType = "whitelist"
|
||||
c.AccessListType = "allowlist"
|
||||
}
|
||||
}
|
||||
if c.AccessListType != "whitelist" && c.AccessListType != "blacklist" {
|
||||
if c.AccessListType != "allowlist" && c.AccessListType != "blocklist" {
|
||||
c.AccessListType = "none"
|
||||
}
|
||||
}
|
||||
|
||||
// AddAccessListMember adds a member to either the blacklist or the whitelist
|
||||
// AddAccessListMember adds a member to either the blocklist or the allowlist
|
||||
func (c *Conf) AddAccessListMember(key string) {
|
||||
for _, item := range c.AccessList {
|
||||
if item == key {
|
||||
@ -46,9 +46,9 @@ func (c *Conf) AddAccessListMember(key string) {
|
||||
}
|
||||
|
||||
func (c *Conf) accesslisttype() string {
|
||||
if c.AccessListType == "whitelist" {
|
||||
if c.AccessListType == "allowlist" {
|
||||
return "i2cp.enableAccessList=true"
|
||||
} else if c.AccessListType == "blacklist" {
|
||||
} else if c.AccessListType == "blocklist" {
|
||||
return "i2cp.enableBlackList=true"
|
||||
} else if c.AccessListType == "none" {
|
||||
return ""
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"github.com/eyedeekay/sam-forwarder/i2pkeys"
|
||||
sfi2pkeys "github.com/eyedeekay/sam-forwarder/i2pkeys"
|
||||
"github.com/eyedeekay/sam3/i2pkeys"
|
||||
)
|
||||
|
||||
@ -47,17 +47,18 @@ func (f *Conf) print() []string {
|
||||
"outbound.backupQuantity=" + fmt.Sprintf("%d", f.OutBackupQuantity),
|
||||
"inbound.quantity=" + fmt.Sprintf("%d", f.InQuantity),
|
||||
"outbound.quantity=" + fmt.Sprintf("%d", f.OutQuantity),
|
||||
"inbound.allowZeroHop=" + fmt.Sprintf("%b", f.InAllowZeroHop),
|
||||
"outbound.allowZeroHop=" + fmt.Sprintf("%b", f.OutAllowZeroHop),
|
||||
"i2cp.fastRecieve=" + fmt.Sprintf("%b", f.FastRecieve),
|
||||
"i2cp.gzip=" + fmt.Sprintf("%b", f.UseCompression),
|
||||
"i2cp.reduceOnIdle=" + fmt.Sprintf("%b", f.ReduceIdle),
|
||||
"i2cp.reduceIdleTime=" + fmt.Sprintf("%d", f.ReduceIdleTime),
|
||||
"inbound.allowZeroHop=" + fmt.Sprintf("%v", f.InAllowZeroHop),
|
||||
"outbound.allowZeroHop=" + fmt.Sprintf("%v", f.OutAllowZeroHop),
|
||||
"i2cp.fastRecieve=" + fmt.Sprintf("%v", f.FastRecieve),
|
||||
"i2cp.gzip=" + fmt.Sprintf("%v", f.UseCompression),
|
||||
"i2cp.reduceOnIdle=" + fmt.Sprintf("%v", f.ReduceIdle),
|
||||
"i2cp.reduceIdleTime=" + fmt.Sprintf("%v", f.ReduceIdleTime),
|
||||
"i2cp.reduceQuantity=" + fmt.Sprintf("%d", f.ReduceIdleQuantity),
|
||||
"i2cp.closeOnIdle=" + fmt.Sprintf("%b", f.CloseIdle),
|
||||
"i2cp.closeOnIdle=" + fmt.Sprintf("%v", f.CloseIdle),
|
||||
"i2cp.closeIdleTime=" + fmt.Sprintf("%d", f.CloseIdleTime),
|
||||
"i2cp.messageReliability=" + f.MessageReliability,
|
||||
"i2cp.encryptLeaseSet=" + fmt.Sprintf("%b", f.EncryptLeaseSet),
|
||||
"i2cp.encryptLeaseSet=" + fmt.Sprintf("%v", f.EncryptLeaseSet),
|
||||
"i2cp.leaseSetEncType=" + fmt.Sprintf("%s", f.LeaseSetEncType),
|
||||
lsk, lspk, lspsk,
|
||||
f.accesslisttype(),
|
||||
f.accesslist(),
|
||||
@ -107,9 +108,9 @@ func (f *Conf) Search(search string) string {
|
||||
|
||||
/*
|
||||
func (f *Conf) accesslisttype() string {
|
||||
if f.accessListType == "whitelist" {
|
||||
if f.accessListType == "allowlist" {
|
||||
return "i2cp.enableAccessList=true"
|
||||
} else if f.accessListType == "blacklist" {
|
||||
} else if f.accessListType == "blocklist" {
|
||||
return "i2cp.enableBlackList=true"
|
||||
} else if f.accessListType == "none" {
|
||||
return ""
|
||||
|
@ -22,6 +22,6 @@ func (c *Conf) SetClientDest(label ...string) {
|
||||
if v, ok := c.Get("destination", label...); ok {
|
||||
c.ClientDest = v
|
||||
} else {
|
||||
c.ClientDest = v
|
||||
c.ClientDest = ""
|
||||
}
|
||||
}
|
||||
|
1
config/helpers/helper.go
Normal file
1
config/helpers/helper.go
Normal file
@ -0,0 +1 @@
|
||||
package i2ptunhelper
|
226
config/helpers/tunconf_client.go
Normal file
226
config/helpers/tunconf_client.go
Normal file
@ -0,0 +1,226 @@
|
||||
package i2ptunhelper
|
||||
|
||||
import (
|
||||
"github.com/eyedeekay/httptunnel"
|
||||
"github.com/eyedeekay/httptunnel/multiproxy"
|
||||
"github.com/eyedeekay/sam-forwarder/config"
|
||||
"github.com/eyedeekay/sam-forwarder/options"
|
||||
"github.com/eyedeekay/sam-forwarder/tcp"
|
||||
"github.com/eyedeekay/sam-forwarder/udp"
|
||||
)
|
||||
|
||||
func NewSAMHTTPClientFromConf(config *i2ptunconf.Conf) (*i2phttpproxy.SAMHTTPProxy, error) {
|
||||
if config != nil {
|
||||
return i2phttpproxy.NewHttpProxy(
|
||||
i2phttpproxy.SetName(config.TunName),
|
||||
i2phttpproxy.SetKeysPath(config.KeyFilePath),
|
||||
i2phttpproxy.SetHost(config.SamHost),
|
||||
i2phttpproxy.SetPort(config.SamPort),
|
||||
i2phttpproxy.SetProxyAddr(config.TargetHost+":"+config.TargetPort),
|
||||
i2phttpproxy.SetControlHost(config.ControlHost),
|
||||
i2phttpproxy.SetControlPort(config.ControlPort),
|
||||
i2phttpproxy.SetInLength(uint(config.InLength)),
|
||||
i2phttpproxy.SetOutLength(uint(config.OutLength)),
|
||||
i2phttpproxy.SetInQuantity(uint(config.InQuantity)),
|
||||
i2phttpproxy.SetOutQuantity(uint(config.OutQuantity)),
|
||||
i2phttpproxy.SetInBackups(uint(config.InBackupQuantity)),
|
||||
i2phttpproxy.SetOutBackups(uint(config.OutBackupQuantity)),
|
||||
i2phttpproxy.SetInVariance(config.InVariance),
|
||||
i2phttpproxy.SetOutVariance(config.OutVariance),
|
||||
i2phttpproxy.SetUnpublished(config.Client),
|
||||
i2phttpproxy.SetReduceIdle(config.ReduceIdle),
|
||||
i2phttpproxy.SetCompression(config.UseCompression),
|
||||
i2phttpproxy.SetReduceIdleTime(uint(config.ReduceIdleTime)),
|
||||
i2phttpproxy.SetReduceIdleQuantity(uint(config.ReduceIdleQuantity)),
|
||||
i2phttpproxy.SetCloseIdle(config.CloseIdle),
|
||||
i2phttpproxy.SetCloseIdleTime(uint(config.CloseIdleTime)),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMClientForwarderFromConfig generates a new SAMForwarder from a config file
|
||||
func NewSAMHTTPClientFromConfig(iniFile, SamHost, SamPort string, label ...string) (*i2phttpproxy.SAMHTTPProxy, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewSAMHTTPClientFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func NewSAMBrowserClientFromConf(config *i2ptunconf.Conf) (*i2pbrowserproxy.SAMMultiProxy, error) {
|
||||
if config != nil {
|
||||
return i2pbrowserproxy.NewHttpProxy(
|
||||
i2pbrowserproxy.SetName(config.TunName),
|
||||
i2pbrowserproxy.SetKeysPath(config.KeyFilePath),
|
||||
i2pbrowserproxy.SetHost(config.SamHost),
|
||||
i2pbrowserproxy.SetPort(config.SamPort),
|
||||
i2pbrowserproxy.SetProxyAddr(config.TargetHost+":"+config.TargetPort),
|
||||
i2pbrowserproxy.SetControlHost(config.ControlHost),
|
||||
i2pbrowserproxy.SetControlPort(config.ControlPort),
|
||||
i2pbrowserproxy.SetInLength(uint(config.InLength)),
|
||||
i2pbrowserproxy.SetOutLength(uint(config.OutLength)),
|
||||
i2pbrowserproxy.SetInQuantity(uint(config.InQuantity)),
|
||||
i2pbrowserproxy.SetOutQuantity(uint(config.OutQuantity)),
|
||||
i2pbrowserproxy.SetInBackups(uint(config.InBackupQuantity)),
|
||||
i2pbrowserproxy.SetOutBackups(uint(config.OutBackupQuantity)),
|
||||
i2pbrowserproxy.SetInVariance(config.InVariance),
|
||||
i2pbrowserproxy.SetOutVariance(config.OutVariance),
|
||||
i2pbrowserproxy.SetUnpublished(config.Client),
|
||||
i2pbrowserproxy.SetReduceIdle(config.ReduceIdle),
|
||||
i2pbrowserproxy.SetCompression(config.UseCompression),
|
||||
i2pbrowserproxy.SetReduceIdleTime(uint(config.ReduceIdleTime)),
|
||||
i2pbrowserproxy.SetReduceIdleQuantity(uint(config.ReduceIdleQuantity)),
|
||||
//i2pbrowserproxy.SetCloseIdle(config.CloseIdle),
|
||||
//i2pbrowserproxy.SetCloseIdleTime(uint(config.CloseIdleTime)),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func NewSAMBrowserClientFromConfig(iniFile, SamHost, SamPort string, label ...string) (*i2pbrowserproxy.SAMMultiProxy, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewSAMBrowserClientFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMClientForwarderFromConf generates a SAMforwarder from *i2ptunconf.Conf
|
||||
func NewSAMClientForwarderFromConf(config *i2ptunconf.Conf) (*samforwarder.SAMClientForwarder, error) {
|
||||
if config != nil {
|
||||
return samforwarder.NewSAMClientForwarderFromOptions(
|
||||
samoptions.SetSaveFile(config.SaveFile),
|
||||
samoptions.SetFilePath(config.SaveDirectory),
|
||||
samoptions.SetHost(config.TargetHost),
|
||||
samoptions.SetPort(config.TargetPort),
|
||||
samoptions.SetSAMHost(config.SamHost),
|
||||
samoptions.SetSAMPort(config.SamPort),
|
||||
samoptions.SetSigType(config.SigType),
|
||||
samoptions.SetName(config.TunName),
|
||||
samoptions.SetInLength(config.InLength),
|
||||
samoptions.SetOutLength(config.OutLength),
|
||||
samoptions.SetInVariance(config.InVariance),
|
||||
samoptions.SetOutVariance(config.OutVariance),
|
||||
samoptions.SetInQuantity(config.InQuantity),
|
||||
samoptions.SetOutQuantity(config.OutQuantity),
|
||||
samoptions.SetInBackups(config.InBackupQuantity),
|
||||
samoptions.SetOutBackups(config.OutBackupQuantity),
|
||||
samoptions.SetEncrypt(config.EncryptLeaseSet),
|
||||
samoptions.SetLeaseSetKey(config.LeaseSetKey),
|
||||
samoptions.SetLeaseSetPrivateKey(config.LeaseSetPrivateKey),
|
||||
samoptions.SetLeaseSetPrivateSigningKey(config.LeaseSetPrivateSigningKey),
|
||||
samoptions.SetAllowZeroIn(config.InAllowZeroHop),
|
||||
samoptions.SetAllowZeroOut(config.OutAllowZeroHop),
|
||||
samoptions.SetFastRecieve(config.FastRecieve),
|
||||
samoptions.SetCompress(config.UseCompression),
|
||||
samoptions.SetReduceIdle(config.ReduceIdle),
|
||||
samoptions.SetReduceIdleTimeMs(config.ReduceIdleTime),
|
||||
samoptions.SetReduceIdleQuantity(config.ReduceIdleQuantity),
|
||||
samoptions.SetCloseIdle(config.CloseIdle),
|
||||
samoptions.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||
samoptions.SetAccessListType(config.AccessListType),
|
||||
samoptions.SetAccessList(config.AccessList),
|
||||
samoptions.SetMessageReliability(config.MessageReliability),
|
||||
samoptions.SetPassword(config.KeyFilePath),
|
||||
samoptions.SetDestination(config.ClientDest),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMClientForwarderFromConfig generates a new SAMForwarder from a config file
|
||||
func NewSAMClientForwarderFromConfig(iniFile, SamHost, SamPort string, label ...string) (*samforwarder.SAMClientForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewSAMClientForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMDGClientForwarderFromConf generates a SAMSSUforwarder from *i2ptunconf.Conf
|
||||
func NewSAMDGClientForwarderFromConf(config *i2ptunconf.Conf) (*samforwarderudp.SAMDGClientForwarder, error) {
|
||||
if config != nil {
|
||||
return samforwarderudp.NewSAMDGClientForwarderFromOptions(
|
||||
samoptions.SetSaveFile(config.SaveFile),
|
||||
samoptions.SetFilePath(config.SaveDirectory),
|
||||
samoptions.SetHost(config.TargetHost),
|
||||
samoptions.SetPort(config.TargetPort),
|
||||
samoptions.SetSAMHost(config.SamHost),
|
||||
samoptions.SetSAMPort(config.SamPort),
|
||||
samoptions.SetSigType(config.SigType),
|
||||
samoptions.SetName(config.TunName),
|
||||
samoptions.SetInLength(config.InLength),
|
||||
samoptions.SetOutLength(config.OutLength),
|
||||
samoptions.SetInVariance(config.InVariance),
|
||||
samoptions.SetOutVariance(config.OutVariance),
|
||||
samoptions.SetInQuantity(config.InQuantity),
|
||||
samoptions.SetOutQuantity(config.OutQuantity),
|
||||
samoptions.SetInBackups(config.InBackupQuantity),
|
||||
samoptions.SetOutBackups(config.OutBackupQuantity),
|
||||
samoptions.SetEncrypt(config.EncryptLeaseSet),
|
||||
samoptions.SetLeaseSetKey(config.LeaseSetKey),
|
||||
samoptions.SetLeaseSetPrivateKey(config.LeaseSetPrivateKey),
|
||||
samoptions.SetLeaseSetPrivateSigningKey(config.LeaseSetPrivateSigningKey),
|
||||
samoptions.SetAllowZeroIn(config.InAllowZeroHop),
|
||||
samoptions.SetAllowZeroOut(config.OutAllowZeroHop),
|
||||
samoptions.SetFastRecieve(config.FastRecieve),
|
||||
samoptions.SetCompress(config.UseCompression),
|
||||
samoptions.SetReduceIdle(config.ReduceIdle),
|
||||
samoptions.SetReduceIdleTimeMs(config.ReduceIdleTime),
|
||||
samoptions.SetReduceIdleQuantity(config.ReduceIdleQuantity),
|
||||
samoptions.SetCloseIdle(config.CloseIdle),
|
||||
samoptions.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||
samoptions.SetAccessListType(config.AccessListType),
|
||||
samoptions.SetAccessList(config.AccessList),
|
||||
samoptions.SetMessageReliability(config.MessageReliability),
|
||||
samoptions.SetPassword(config.KeyFilePath),
|
||||
samoptions.SetDestination(config.ClientDest),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func NewSAMDGClientForwarderFromConfig(iniFile, SamHost, SamPort string, label ...string) (*samforwarderudp.SAMDGClientForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewSAMDGClientForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
130
config/helpers/tunconf_outproxy.go
Normal file
130
config/helpers/tunconf_outproxy.go
Normal file
@ -0,0 +1,130 @@
|
||||
package i2ptunhelper
|
||||
|
||||
import (
|
||||
"github.com/eyedeekay/outproxy"
|
||||
"github.com/eyedeekay/sam-forwarder/config"
|
||||
)
|
||||
|
||||
// NewOutProxyFromConf generates a SAMforwarder from *i2ptunconf.Conf
|
||||
func NewOutProxyFromConf(config *i2ptunconf.Conf) (*outproxy.OutProxy, error) {
|
||||
if config != nil {
|
||||
return outproxy.NewOutProxyFromOptions(
|
||||
outproxy.SetType(config.Type),
|
||||
outproxy.SetSaveFile(config.SaveFile),
|
||||
outproxy.SetFilePath(config.SaveDirectory),
|
||||
outproxy.SetHost(config.TargetHost),
|
||||
outproxy.SetPort(config.TargetPort),
|
||||
outproxy.SetSAMHost(config.SamHost),
|
||||
outproxy.SetSAMPort(config.SamPort),
|
||||
outproxy.SetSigType(config.SigType),
|
||||
outproxy.SetName(config.TunName),
|
||||
outproxy.SetInLength(config.InLength),
|
||||
outproxy.SetOutLength(config.OutLength),
|
||||
outproxy.SetInVariance(config.InVariance),
|
||||
outproxy.SetOutVariance(config.OutVariance),
|
||||
outproxy.SetInQuantity(config.InQuantity),
|
||||
outproxy.SetOutQuantity(config.OutQuantity),
|
||||
outproxy.SetInBackups(config.InBackupQuantity),
|
||||
outproxy.SetOutBackups(config.OutBackupQuantity),
|
||||
outproxy.SetEncrypt(config.EncryptLeaseSet),
|
||||
outproxy.SetLeaseSetKey(config.LeaseSetKey),
|
||||
outproxy.SetLeaseSetPrivateKey(config.LeaseSetPrivateKey),
|
||||
outproxy.SetLeaseSetPrivateSigningKey(config.LeaseSetPrivateSigningKey),
|
||||
outproxy.SetAllowZeroIn(config.InAllowZeroHop),
|
||||
outproxy.SetAllowZeroOut(config.OutAllowZeroHop),
|
||||
outproxy.SetFastRecieve(config.FastRecieve),
|
||||
outproxy.SetCompress(config.UseCompression),
|
||||
outproxy.SetReduceIdle(config.ReduceIdle),
|
||||
outproxy.SetReduceIdleTimeMs(config.ReduceIdleTime),
|
||||
outproxy.SetReduceIdleQuantity(config.ReduceIdleQuantity),
|
||||
outproxy.SetCloseIdle(config.CloseIdle),
|
||||
outproxy.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||
outproxy.SetAccessListType(config.AccessListType),
|
||||
outproxy.SetAccessList(config.AccessList),
|
||||
outproxy.SetMessageReliability(config.MessageReliability),
|
||||
outproxy.SetKeyFile(config.KeyFilePath),
|
||||
//outproxy.SetTargetForPort443(config.TargetForPort443),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewOutProxyFromConfig generates a new OutProxy from a config file
|
||||
func NewOutProxyFromConfig(iniFile, SamHost, SamPort string, label ...string) (*outproxy.HttpOutProxy, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewHttpOutProxyFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewOutProxyFromConf generates a SAMforwarder from *i2ptunconf.Conf
|
||||
func NewHttpOutProxyFromConf(config *i2ptunconf.Conf) (*outproxy.HttpOutProxy, error) {
|
||||
if config != nil {
|
||||
return outproxy.NewHttpOutProxydFromOptions(
|
||||
outproxy.SetHttpType(config.Type),
|
||||
outproxy.SetHttpSaveFile(config.SaveFile),
|
||||
outproxy.SetHttpFilePath(config.SaveDirectory),
|
||||
outproxy.SetHttpHost(config.TargetHost),
|
||||
outproxy.SetHttpPort(config.TargetPort),
|
||||
outproxy.SetHttpSAMHost(config.SamHost),
|
||||
outproxy.SetHttpSAMPort(config.SamPort),
|
||||
outproxy.SetHttpSigType(config.SigType),
|
||||
outproxy.SetHttpName(config.TunName),
|
||||
outproxy.SetHttpInLength(config.InLength),
|
||||
outproxy.SetHttpOutLength(config.OutLength),
|
||||
outproxy.SetHttpInVariance(config.InVariance),
|
||||
outproxy.SetHttpOutVariance(config.OutVariance),
|
||||
outproxy.SetHttpInQuantity(config.InQuantity),
|
||||
outproxy.SetHttpOutQuantity(config.OutQuantity),
|
||||
outproxy.SetHttpInBackups(config.InBackupQuantity),
|
||||
outproxy.SetHttpOutBackups(config.OutBackupQuantity),
|
||||
outproxy.SetHttpEncrypt(config.EncryptLeaseSet),
|
||||
outproxy.SetHttpLeaseSetKey(config.LeaseSetKey),
|
||||
outproxy.SetHttpLeaseSetPrivateKey(config.LeaseSetPrivateKey),
|
||||
outproxy.SetHttpLeaseSetPrivateSigningKey(config.LeaseSetPrivateSigningKey),
|
||||
outproxy.SetHttpAllowZeroIn(config.InAllowZeroHop),
|
||||
outproxy.SetHttpAllowZeroOut(config.OutAllowZeroHop),
|
||||
outproxy.SetHttpFastRecieve(config.FastRecieve),
|
||||
outproxy.SetHttpCompress(config.UseCompression),
|
||||
outproxy.SetHttpReduceIdle(config.ReduceIdle),
|
||||
outproxy.SetHttpReduceIdleTimeMs(config.ReduceIdleTime),
|
||||
outproxy.SetHttpReduceIdleQuantity(config.ReduceIdleQuantity),
|
||||
outproxy.SetHttpCloseIdle(config.CloseIdle),
|
||||
outproxy.SetHttpCloseIdleTimeMs(config.CloseIdleTime),
|
||||
outproxy.SetHttpAccessListType(config.AccessListType),
|
||||
outproxy.SetHttpAccessList(config.AccessList),
|
||||
outproxy.SetHttpMessageReliability(config.MessageReliability),
|
||||
outproxy.SetHttpKeyFile(config.KeyFilePath),
|
||||
//outproxy.SetHttpTargetForPort443(config.TargetForPort443),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewOutProxyFromConfig generates a new OutProxy from a config file
|
||||
func NewHttpOutProxyFromConfig(iniFile, SamHost, SamPort string, label ...string) (*outproxy.OutProxy, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewOutProxyFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
194
config/helpers/tunconf_server.go
Normal file
194
config/helpers/tunconf_server.go
Normal file
@ -0,0 +1,194 @@
|
||||
package i2ptunhelper
|
||||
|
||||
import (
|
||||
"github.com/eyedeekay/eephttpd"
|
||||
"github.com/eyedeekay/sam-forwarder/config"
|
||||
"github.com/eyedeekay/sam-forwarder/options"
|
||||
"github.com/eyedeekay/sam-forwarder/tcp"
|
||||
"github.com/eyedeekay/sam-forwarder/udp"
|
||||
)
|
||||
|
||||
// NewSAMForwarderFromConf generates a SAMforwarder from *i2ptunconf.Conf
|
||||
func NewSAMForwarderFromConf(config *i2ptunconf.Conf) (*samforwarder.SAMForwarder, error) {
|
||||
if config != nil {
|
||||
return samforwarder.NewSAMForwarderFromOptions(
|
||||
samoptions.SetType(config.Type),
|
||||
samoptions.SetSaveFile(config.SaveFile),
|
||||
samoptions.SetFilePath(config.SaveDirectory),
|
||||
samoptions.SetHost(config.TargetHost),
|
||||
samoptions.SetPort(config.TargetPort),
|
||||
samoptions.SetSAMHost(config.SamHost),
|
||||
samoptions.SetSAMPort(config.SamPort),
|
||||
samoptions.SetSigType(config.SigType),
|
||||
samoptions.SetName(config.TunName),
|
||||
samoptions.SetInLength(config.InLength),
|
||||
samoptions.SetOutLength(config.OutLength),
|
||||
samoptions.SetInVariance(config.InVariance),
|
||||
samoptions.SetOutVariance(config.OutVariance),
|
||||
samoptions.SetInQuantity(config.InQuantity),
|
||||
samoptions.SetOutQuantity(config.OutQuantity),
|
||||
samoptions.SetInBackups(config.InBackupQuantity),
|
||||
samoptions.SetOutBackups(config.OutBackupQuantity),
|
||||
samoptions.SetEncrypt(config.EncryptLeaseSet),
|
||||
samoptions.SetLeaseSetKey(config.LeaseSetKey),
|
||||
samoptions.SetLeaseSetPrivateKey(config.LeaseSetPrivateKey),
|
||||
samoptions.SetLeaseSetPrivateSigningKey(config.LeaseSetPrivateSigningKey),
|
||||
samoptions.SetAllowZeroIn(config.InAllowZeroHop),
|
||||
samoptions.SetAllowZeroOut(config.OutAllowZeroHop),
|
||||
samoptions.SetFastRecieve(config.FastRecieve),
|
||||
samoptions.SetCompress(config.UseCompression),
|
||||
samoptions.SetReduceIdle(config.ReduceIdle),
|
||||
samoptions.SetReduceIdleTimeMs(config.ReduceIdleTime),
|
||||
samoptions.SetReduceIdleQuantity(config.ReduceIdleQuantity),
|
||||
samoptions.SetCloseIdle(config.CloseIdle),
|
||||
samoptions.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||
samoptions.SetAccessListType(config.AccessListType),
|
||||
samoptions.SetAccessList(config.AccessList),
|
||||
samoptions.SetMessageReliability(config.MessageReliability),
|
||||
samoptions.SetKeyFile(config.KeyFilePath),
|
||||
//samoptions.SetTargetForPort443(config.TargetForPort443),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMForwarderFromConfig generates a new SAMForwarder from a config file
|
||||
func NewSAMForwarderFromConfig(iniFile, SamHost, SamPort string, label ...string) (*samforwarder.SAMForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewSAMForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMDGForwarderFromConf generates a SAMSSUforwarder from *i2ptunconf.Conf
|
||||
func NewSAMDGForwarderFromConf(config *i2ptunconf.Conf) (*samforwarderudp.SAMDGForwarder, error) {
|
||||
if config != nil {
|
||||
return samforwarderudp.NewSAMDGForwarderFromOptions(
|
||||
samoptions.SetSaveFile(config.SaveFile),
|
||||
samoptions.SetFilePath(config.SaveDirectory),
|
||||
samoptions.SetHost(config.TargetHost),
|
||||
samoptions.SetPort(config.TargetPort),
|
||||
samoptions.SetSAMHost(config.SamHost),
|
||||
samoptions.SetSAMPort(config.SamPort),
|
||||
samoptions.SetSigType(config.SigType),
|
||||
samoptions.SetName(config.TunName),
|
||||
samoptions.SetInLength(config.InLength),
|
||||
samoptions.SetOutLength(config.OutLength),
|
||||
samoptions.SetInVariance(config.InVariance),
|
||||
samoptions.SetOutVariance(config.OutVariance),
|
||||
samoptions.SetInQuantity(config.InQuantity),
|
||||
samoptions.SetOutQuantity(config.OutQuantity),
|
||||
samoptions.SetInBackups(config.InBackupQuantity),
|
||||
samoptions.SetOutBackups(config.OutBackupQuantity),
|
||||
samoptions.SetEncrypt(config.EncryptLeaseSet),
|
||||
samoptions.SetLeaseSetKey(config.LeaseSetKey),
|
||||
samoptions.SetLeaseSetPrivateKey(config.LeaseSetPrivateKey),
|
||||
samoptions.SetLeaseSetPrivateSigningKey(config.LeaseSetPrivateSigningKey),
|
||||
samoptions.SetAllowZeroIn(config.InAllowZeroHop),
|
||||
samoptions.SetAllowZeroOut(config.OutAllowZeroHop),
|
||||
samoptions.SetFastRecieve(config.FastRecieve),
|
||||
samoptions.SetCompress(config.UseCompression),
|
||||
samoptions.SetReduceIdle(config.ReduceIdle),
|
||||
samoptions.SetReduceIdleTimeMs(config.ReduceIdleTime),
|
||||
samoptions.SetReduceIdleQuantity(config.ReduceIdleQuantity),
|
||||
samoptions.SetCloseIdle(config.CloseIdle),
|
||||
samoptions.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||
samoptions.SetAccessListType(config.AccessListType),
|
||||
samoptions.SetAccessList(config.AccessList),
|
||||
samoptions.SetMessageReliability(config.MessageReliability),
|
||||
samoptions.SetKeyFile(config.KeyFilePath),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMDGForwarderFromConfig generates a new SAMDGForwarder from a config file
|
||||
func NewSAMDGForwarderFromConfig(iniFile, SamHost, SamPort string, label ...string) (*samforwarderudp.SAMDGForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewSAMDGForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewEepHttpdFromConf generates a SAMforwarder from *i2ptunconf.Conf
|
||||
func NewEepHttpdFromConf(config *i2ptunconf.Conf) (*eephttpd.EepHttpd, error) {
|
||||
if config != nil {
|
||||
return eephttpd.NewEepHttpdFromOptions(
|
||||
eephttpd.SetType(config.Type),
|
||||
eephttpd.SetSaveFile(config.SaveFile),
|
||||
eephttpd.SetFilePath(config.SaveDirectory),
|
||||
eephttpd.SetHost(config.TargetHost),
|
||||
eephttpd.SetPort(config.TargetPort),
|
||||
eephttpd.SetSAMHost(config.SamHost),
|
||||
eephttpd.SetSAMPort(config.SamPort),
|
||||
eephttpd.SetSigType(config.SigType),
|
||||
eephttpd.SetName(config.TunName),
|
||||
eephttpd.SetInLength(config.InLength),
|
||||
eephttpd.SetOutLength(config.OutLength),
|
||||
eephttpd.SetInVariance(config.InVariance),
|
||||
eephttpd.SetOutVariance(config.OutVariance),
|
||||
eephttpd.SetInQuantity(config.InQuantity),
|
||||
eephttpd.SetOutQuantity(config.OutQuantity),
|
||||
eephttpd.SetInBackups(config.InBackupQuantity),
|
||||
eephttpd.SetOutBackups(config.OutBackupQuantity),
|
||||
eephttpd.SetEncrypt(config.EncryptLeaseSet),
|
||||
eephttpd.SetLeaseSetKey(config.LeaseSetKey),
|
||||
eephttpd.SetLeaseSetPrivateKey(config.LeaseSetPrivateKey),
|
||||
eephttpd.SetLeaseSetPrivateSigningKey(config.LeaseSetPrivateSigningKey),
|
||||
eephttpd.SetAllowZeroIn(config.InAllowZeroHop),
|
||||
eephttpd.SetAllowZeroOut(config.OutAllowZeroHop),
|
||||
eephttpd.SetFastRecieve(config.FastRecieve),
|
||||
eephttpd.SetCompress(config.UseCompression),
|
||||
eephttpd.SetReduceIdle(config.ReduceIdle),
|
||||
eephttpd.SetReduceIdleTimeMs(config.ReduceIdleTime),
|
||||
eephttpd.SetReduceIdleQuantity(config.ReduceIdleQuantity),
|
||||
eephttpd.SetCloseIdle(config.CloseIdle),
|
||||
eephttpd.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||
eephttpd.SetAccessListType(config.AccessListType),
|
||||
eephttpd.SetAccessList(config.AccessList),
|
||||
eephttpd.SetMessageReliability(config.MessageReliability),
|
||||
eephttpd.SetKeyFile(config.KeyFilePath),
|
||||
eephttpd.SetServeDir(config.ServeDirectory),
|
||||
//eephttpd.SetTargetForPort443(config.TargetForPort443),
|
||||
)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewEepHttpdFromConfig generates a new EepHttpd from a config file
|
||||
func NewEepHttpdFromConfig(iniFile, SamHost, SamPort string, label ...string) (*eephttpd.EepHttpd, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := i2ptunconf.NewI2PTunConf(iniFile, label...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if SamHost != "" && SamHost != "127.0.0.1" && SamHost != "localhost" {
|
||||
config.SamHost = config.GetSAMHost(SamHost, config.SamHost)
|
||||
}
|
||||
if SamPort != "" && SamPort != "7656" {
|
||||
config.SamPort = config.GetSAMPort(SamPort, config.SamPort)
|
||||
}
|
||||
return NewEepHttpdFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
@ -103,3 +103,29 @@ func (c *Conf) SetLeasesetPrivateSigningKey(label ...string) {
|
||||
c.LeaseSetPrivateSigningKey = ""
|
||||
}
|
||||
}
|
||||
|
||||
// GetLeaseSetEncType takes an argument and a default. If the argument differs from the
|
||||
// default, the argument is always returned. If the argument and default are
|
||||
// the same and the key exists, the key is returned. If the key is absent, the
|
||||
// default is returned.
|
||||
func (c *Conf) GetLeaseSetEncType(arg, def string, label ...string) string {
|
||||
if arg != def {
|
||||
return arg
|
||||
}
|
||||
if c.Config == nil {
|
||||
return arg
|
||||
}
|
||||
if x, o := c.Get("i2cp.leaseSetEncType", label...); o {
|
||||
return x
|
||||
}
|
||||
return arg
|
||||
}
|
||||
|
||||
// SetLeaseSetEncType tells the conf to use encrypted leasesets the from the config file
|
||||
func (c *Conf) SetLeaseSetEncType(label ...string) {
|
||||
if v, ok := c.Get("i2cp.leaseSetEncType", label...); ok {
|
||||
c.LeaseSetEncType = v
|
||||
} else {
|
||||
c.LeaseSetEncType = ""
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,12 @@
|
||||
package i2ptunconf
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"strings"
|
||||
|
||||
"github.com/eyedeekay/sam-forwarder/tls"
|
||||
)
|
||||
|
||||
// GetPort443 takes an argument and a default. If the argument differs from the
|
||||
// default, the argument is always returned. If the argument and default are
|
||||
// the same and the key exists, the key is returned. If the key is absent, the
|
||||
@ -25,3 +32,80 @@ func (c *Conf) SetTargetPort443(label ...string) {
|
||||
c.TargetForPort443 = ""
|
||||
}
|
||||
}
|
||||
|
||||
// Get
|
||||
func (c *Conf) GetUseTLS(arg, def bool, label ...string) bool {
|
||||
if arg != def {
|
||||
return arg
|
||||
}
|
||||
if c.Config == nil {
|
||||
return arg
|
||||
}
|
||||
if x, o := c.GetBool("usetls", label...); o {
|
||||
return x
|
||||
}
|
||||
return arg
|
||||
}
|
||||
|
||||
// SetAllowZeroHopOut sets the config to allow zero-hop tunnels
|
||||
func (c *Conf) SetUseTLS(label ...string) {
|
||||
if v, ok := c.GetBool("usetls", label...); ok {
|
||||
c.UseTLS = v
|
||||
} else {
|
||||
c.UseTLS = false
|
||||
}
|
||||
}
|
||||
|
||||
// GetTLSConfig
|
||||
func (c *Conf) GetTLSConfigCertPem(arg, def string, label ...string) string {
|
||||
if arg != def {
|
||||
return arg
|
||||
}
|
||||
if c.Config == nil {
|
||||
return arg
|
||||
}
|
||||
if x, o := c.Get("cert.pem", label...); o {
|
||||
return x
|
||||
}
|
||||
return arg
|
||||
}
|
||||
|
||||
// SetClientDest sets the key name from the config file
|
||||
func (c *Conf) SetTLSConfigCertPem(label ...string) {
|
||||
if v, ok := c.Get("cert.pem", label...); ok {
|
||||
c.Cert = v
|
||||
} else {
|
||||
c.Cert = ""
|
||||
}
|
||||
}
|
||||
|
||||
// GetTLSConfig
|
||||
func (c *Conf) GetTLSConfigKeyPem(arg, def string, label ...string) string {
|
||||
if arg != def {
|
||||
return arg
|
||||
}
|
||||
if c.Config == nil {
|
||||
return arg
|
||||
}
|
||||
if x, o := c.Get("key.pem", label...); o {
|
||||
return x
|
||||
}
|
||||
return arg
|
||||
}
|
||||
|
||||
// SetClientDest sets the key name from the config file
|
||||
func (c *Conf) SetTLSConfigKeyPem(label ...string) {
|
||||
if v, ok := c.Get("key.pem", label...); ok {
|
||||
c.Pem = v
|
||||
} else {
|
||||
c.Pem = ""
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Conf) TLSConfig() (*tls.Config, error) {
|
||||
names := []string{c.Base32()}
|
||||
if c.HostName != "" && strings.HasSuffix(c.HostName, ".i2p") {
|
||||
names = append(names, c.HostName)
|
||||
}
|
||||
return i2ptls.TLSConfig(c.Cert, c.Pem, names)
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package i2ptunconf
|
||||
|
||||
import (
|
||||
// "crypto/tls"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
@ -10,6 +11,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
// "github.com/eyedeekay/sam3"
|
||||
"github.com/eyedeekay/sam3/i2pkeys"
|
||||
"github.com/zieckey/goini"
|
||||
)
|
||||
@ -17,53 +19,60 @@ import (
|
||||
// Conf is a tructure containing an ini config, with some functions to help
|
||||
// when you use it for in conjunction with command-line flags
|
||||
type Conf struct {
|
||||
Config *goini.INI
|
||||
FilePath string
|
||||
KeyFilePath string
|
||||
Labels []string
|
||||
Client bool
|
||||
ClientDest string
|
||||
SigType string
|
||||
Type string
|
||||
SaveDirectory string
|
||||
SaveFile bool
|
||||
TargetHost string
|
||||
TargetPort string
|
||||
SamHost string
|
||||
SamPort string
|
||||
TunnelHost string
|
||||
ControlHost string
|
||||
ControlPort string
|
||||
TargetForPort443 string
|
||||
TunName string
|
||||
EncryptLeaseSet bool
|
||||
LeaseSetKey string
|
||||
LeaseSetPrivateKey string
|
||||
LeaseSetPrivateSigningKey string
|
||||
InAllowZeroHop bool
|
||||
OutAllowZeroHop bool
|
||||
InLength int
|
||||
OutLength int
|
||||
InQuantity int
|
||||
OutQuantity int
|
||||
InVariance int
|
||||
OutVariance int
|
||||
InBackupQuantity int
|
||||
OutBackupQuantity int
|
||||
UseCompression bool
|
||||
FastRecieve bool
|
||||
ReduceIdle bool
|
||||
ReduceIdleTime int
|
||||
ReduceIdleQuantity int
|
||||
CloseIdle bool
|
||||
CloseIdleTime int
|
||||
AccessListType string
|
||||
AccessList []string
|
||||
MessageReliability string
|
||||
exists bool
|
||||
UserName string
|
||||
Password string
|
||||
LoadedKeys i2pkeys.I2PKeys
|
||||
Config *goini.INI `default:&goini.INI{}`
|
||||
FilePath string `default:"./"`
|
||||
KeyFilePath string `default:"./"`
|
||||
Labels []string `default:{""}`
|
||||
Client bool `default:true`
|
||||
ClientDest string `default:"idk.i2p"`
|
||||
SigType string `default:"SIGNATURE_TYPE=EdDSA_SHA512_Ed25519"`
|
||||
Type string `default:"client"`
|
||||
SaveDirectory string `default:"./"`
|
||||
ServeDirectory string `default:"./www"`
|
||||
SaveFile bool `default:false`
|
||||
TargetHost string `default:"127.0.0.1"`
|
||||
TargetPort string `default:"7778"`
|
||||
SamHost string `default:"127.0.0.1"`
|
||||
SamPort string `default:"7656"`
|
||||
TunnelHost string `default:"127.0.0.1"`
|
||||
ControlHost string `default:"127.0.0.1"`
|
||||
ControlPort string `default:"7951"`
|
||||
TargetForPort443 string `default:""`
|
||||
TunName string `default:"goi2ptunnel"`
|
||||
EncryptLeaseSet bool `default:false`
|
||||
LeaseSetKey string `default:""`
|
||||
LeaseSetEncType string `default:"4,0"`
|
||||
LeaseSetPrivateKey string `default:""`
|
||||
LeaseSetPrivateSigningKey string `default:""`
|
||||
InAllowZeroHop bool `default:false`
|
||||
OutAllowZeroHop bool `default:false`
|
||||
InLength int `default:3`
|
||||
OutLength int `default:3`
|
||||
InQuantity int `default:1`
|
||||
OutQuantity int `default:1`
|
||||
InVariance int `default:0`
|
||||
OutVariance int `default:0`
|
||||
InBackupQuantity int `default:1`
|
||||
OutBackupQuantity int `default:1`
|
||||
UseCompression bool `default:true`
|
||||
FastRecieve bool `default:true`
|
||||
ReduceIdle bool `default:false`
|
||||
ReduceIdleTime int `default:36000000`
|
||||
ReduceIdleQuantity int `default:1`
|
||||
CloseIdle bool `default:false`
|
||||
CloseIdleTime int `default:36000000`
|
||||
AccessListType string `default:"none"`
|
||||
AccessList []string `default:{""}`
|
||||
MessageReliability string `default:""`
|
||||
exists bool `default:false`
|
||||
UserName string `default:""`
|
||||
Password string `default:""`
|
||||
UseTLS bool `default:false`
|
||||
Cert string `default:""`
|
||||
Pem string `default:""`
|
||||
HostName string `default:""`
|
||||
//TLSConf *tls.Config
|
||||
LoadedKeys i2pkeys.I2PKeys
|
||||
}
|
||||
|
||||
// PrintSlice returns and prints a formatted list of configured tunnel settings.
|
||||
@ -96,7 +105,7 @@ func (c *Conf) PrintSlice() []string {
|
||||
c.lsspk(),
|
||||
}
|
||||
|
||||
log.Println(confstring)
|
||||
log.Println("Tunnel:", c.TunName, "using config:", confstring)
|
||||
return confstring
|
||||
}
|
||||
|
||||
@ -244,6 +253,7 @@ func (c *Conf) I2PINILoad(iniFile string, label ...string) error {
|
||||
c.SetTunName(label...)
|
||||
c.SetSigType(label...)
|
||||
c.SetEncryptLease(label...)
|
||||
c.SetLeaseSetEncType(label...)
|
||||
c.SetLeasesetKey(label...)
|
||||
c.SetLeasesetPrivateKey(label...)
|
||||
c.SetLeasesetPrivateSigningKey(label...)
|
||||
@ -273,6 +283,10 @@ func (c *Conf) I2PINILoad(iniFile string, label ...string) error {
|
||||
c.SetPassword(label...)
|
||||
c.SetControlHost(label...)
|
||||
c.SetControlPort(label...)
|
||||
c.SetWWWDir(label...)
|
||||
c.SetUseTLS(label...)
|
||||
c.SetTLSConfigCertPem(label...)
|
||||
c.SetTLSConfigKeyPem(label...)
|
||||
if v, ok := c.Get("i2cp.accessList", label...); ok {
|
||||
csv := strings.Split(v, ",")
|
||||
for _, z := range csv {
|
||||
@ -285,11 +299,19 @@ func (c *Conf) I2PINILoad(iniFile string, label ...string) error {
|
||||
|
||||
// NewI2PBlankTunConf returns an empty but intialized tunconf
|
||||
func NewI2PBlankTunConf() *Conf {
|
||||
var c Conf
|
||||
// var c Conf
|
||||
c := new(Conf)
|
||||
c.SamHost = "127.0.0.1"
|
||||
c.SamPort = "7656"
|
||||
c.TunName = "unksam"
|
||||
c.TargetHost = "127.0.0.1"
|
||||
c.TargetPort = "0"
|
||||
c.ClientDest = "idk.i2p"
|
||||
c.LeaseSetEncType = "4,0"
|
||||
c.Config = &goini.INI{}
|
||||
c.Config = goini.New()
|
||||
c.Config.Parse([]byte(""), "\n", "=")
|
||||
return &c
|
||||
c.Config.Parse([]byte("[client]\nsamhost=\"127.0.0.1\"\nsamport=\"7656\"\n"), "\n", "=")
|
||||
return c
|
||||
}
|
||||
|
||||
// NewI2PTunConf returns a Conf structure from an ini file, for modification
|
||||
|
@ -25,15 +25,33 @@ func (c *Conf) GetTypes(argc, argu, argh bool, def string, label ...string) stri
|
||||
} else {
|
||||
typ += "server"
|
||||
}
|
||||
if typ != def {
|
||||
return typ
|
||||
}
|
||||
}
|
||||
if def == "kcpclient" {
|
||||
typ = "kcpclient"
|
||||
return def
|
||||
}
|
||||
if def == "kcpserver" {
|
||||
typ = "kcpserver"
|
||||
return def
|
||||
}
|
||||
if typ != def {
|
||||
return typ
|
||||
if def == "eephttpd" {
|
||||
return def
|
||||
}
|
||||
if def == "vpnclient" {
|
||||
return def
|
||||
}
|
||||
if def == "vpnserver" {
|
||||
return def
|
||||
}
|
||||
if def == "outproxy" {
|
||||
return def
|
||||
}
|
||||
if def == "outproxyhttp" {
|
||||
return def
|
||||
}
|
||||
if def == "browserclient" {
|
||||
return def
|
||||
}
|
||||
if c.Config == nil {
|
||||
return typ
|
||||
@ -78,6 +96,12 @@ func (c *Conf) SetType(label ...string) {
|
||||
c.Type = v
|
||||
case "udpclient":
|
||||
c.Type = v
|
||||
case "eephttpd":
|
||||
c.Type = v
|
||||
case "outproxy":
|
||||
c.Type = v
|
||||
case "outproxyhttp":
|
||||
c.Type = v
|
||||
case "vpnserver":
|
||||
c.Type = v
|
||||
case "vpnclient":
|
||||
|
29
config/wwwdir.go
Normal file
29
config/wwwdir.go
Normal file
@ -0,0 +1,29 @@
|
||||
package i2ptunconf
|
||||
|
||||
//
|
||||
|
||||
// GetDir takes an argument and a default. If the argument differs from the
|
||||
// default, the argument is always returned. If the argument and default are
|
||||
// the same and the key exists, the key is returned. If the key is absent, the
|
||||
// default is returned.
|
||||
func (c *Conf) GetWWWDir(arg, def string, label ...string) string {
|
||||
if arg != def {
|
||||
return arg
|
||||
}
|
||||
if c.Config == nil {
|
||||
return arg
|
||||
}
|
||||
if x, o := c.Get("wwwdir", label...); o {
|
||||
return x
|
||||
}
|
||||
return arg
|
||||
}
|
||||
|
||||
// SetDir sets the key save directory from the config file
|
||||
func (c *Conf) SetWWWDir(label ...string) {
|
||||
if v, ok := c.Get("wwwdir", label...); ok {
|
||||
c.ServeDirectory = v
|
||||
} else {
|
||||
c.ServeDirectory = "./www"
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ usage:
|
||||
flag needs an argument: -h
|
||||
Usage of ./bin/samcatd:
|
||||
-a string
|
||||
Type of access list to use, can be "whitelist" "blacklist" or "none". (default "none")
|
||||
Type of access list to use, can be "allowlist" "blocklist" or "none". (default "none")
|
||||
-c Client proxy mode(true or false)
|
||||
-conv string
|
||||
Display the base32 and base64 values of a specified .i2pkeys file
|
||||
|
@ -53,12 +53,12 @@
|
||||
[*] - i2cp.tcp.port 1-65535 7654 Router I2CP port. If the client is running in the same JVM as a router, this option is ignored, and the client connects to that router internally.
|
||||
|
||||
Default Description
|
||||
[C] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blacklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a whitelist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[C] - i2cp.enableAccessList false Use the access list as a whitelist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.enableBlackList false Use the access list as a blacklist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blocklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a allowlist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[C] - i2cp.enableAccessList false Use the access list as a allowlist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.enableBlackList false Use the access list as a blocklist for incoming connections. As of release 0.7.13.
|
||||
[U] - i2p.streaming.answerPings true Whether to respond to incoming pings
|
||||
[U] - i2p.streaming.blacklist null Comma- or space-separated list of Base64 peer Hashes to be blacklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.blocklist null Comma- or space-separated list of Base64 peer Hashes to be blocklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.bufferSize 64K How much transmit data (in bytes) will be accepted that hasn't been written out yet.
|
||||
[U] - i2p.streaming.congestionAvoidanceGrowthRateFactor 1 When we're in congestion avoidance, we grow the window size at the rate of 1/(windowSize*factor). In standard TCP, window sizes are in bytes, while in I2P, window sizes are in messages. A higher number means slower growth.
|
||||
[U] - i2p.streaming.connectDelay -1 How long to wait after instantiating a new con before actually attempting to connect. If this is <= 0, connect immediately with no initial data. If greater than 0, wait until the output stream is flushed, the buffer fills, or that many milliseconds pass, and include any initial data with the SYN.
|
||||
|
@ -58,12 +58,12 @@ key:
|
||||
[*] - i2cp.tcp.port 1-65535 7654 Router I2CP port. If the client is running in the same JVM as a router, this option is ignored, and the client connects to that router internally.
|
||||
|
||||
Default Description
|
||||
[C] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blacklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a whitelist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[C] - i2cp.enableAccessList false Use the access list as a whitelist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.enableBlackList false Use the access list as a blacklist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.accessList null Comma- or space-separated list of Base64 peer Hashes used for either access list or blocklist. As of release 0.7.13.
|
||||
[U] - i2cp.destination.sigType DSA_SHA1 Use the access list as a allowlist for incoming connections. The name or number of the signature type for a transient destination. As of release 0.9.12.
|
||||
[C] - i2cp.enableAccessList false Use the access list as a allowlist for incoming connections. As of release 0.7.13.
|
||||
[C] - i2cp.enableBlackList false Use the access list as a blocklist for incoming connections. As of release 0.7.13.
|
||||
[U] - i2p.streaming.answerPings true Whether to respond to incoming pings
|
||||
[U] - i2p.streaming.blacklist null Comma- or space-separated list of Base64 peer Hashes to be blacklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.blocklist null Comma- or space-separated list of Base64 peer Hashes to be blocklisted for incoming connections to ALL destinations in the context. This option must be set in the context properties, NOT in the createManager() options argument. Note that setting this in the router context will not affect clients outside the router in a separate JVM and context. As of release 0.9.3.
|
||||
[U] - i2p.streaming.bufferSize 64K How much transmit data (in bytes) will be accepted that hasn't been written out yet.
|
||||
[U] - i2p.streaming.congestionAvoidanceGrowthRateFactor 1 When we're in congestion avoidance, we grow the window size at the rate of 1/(windowSize*factor). In standard TCP, window sizes are in bytes, while in I2P, window sizes are in messages. A higher number means slower growth.
|
||||
[U] - i2p.streaming.connectDelay -1 How long to wait after instantiating a new con before actually attempting to connect. If this is <= 0, connect immediately with no initial data. If greater than 0, wait until the output stream is flushed, the buffer fills, or that many milliseconds pass, and include any initial data with the SYN.
|
||||
|
@ -4,7 +4,7 @@
|
||||
<pre><code>flag needs an argument: -h
|
||||
Usage of ./bin/samcatd:
|
||||
-a string
|
||||
Type of access list to use, can be "whitelist" "blacklist" or "none". (default "none")
|
||||
Type of access list to use, can be "allowlist" "blocklist" or "none". (default "none")
|
||||
-c Client proxy mode(true or false)
|
||||
-conv string
|
||||
Display the base32 and base64 values of a specified .i2pkeys file
|
||||
|
@ -1,27 +0,0 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1 +0,0 @@
|
||||
[{"description":"treehash per file","signed_content":{"payload":"eyJjb250ZW50X2hhc2hlcyI6W3siYmxvY2tfc2l6ZSI6NDA5NiwiZGlnZXN0Ijoic2hhMjU2IiwiZmlsZXMiOlt7InBhdGgiOiJMSUNFTlNFIiwicm9vdF9oYXNoIjoiUGIwc2tBVUxaUzFqWldTQnctV0hIRkltRlhVcExiZDlUcVkwR2ZHSHBWcyJ9LHsicGF0aCI6ImNybC1zZXQiLCJyb290X2hhc2giOiJxZVQyMjMyaGhpQmdVellVbDg5NV9zYkJXbnFVeGR1Y2prX3dvVzAtWHdnIn0seyJwYXRoIjoibWFuaWZlc3QuanNvbiIsInJvb3RfaGFzaCI6IjRmLUdfbmRDY3p3Y3pMVWo4Y1lNODVsTnpKZ0R4VzZnNk10TXdfU0Jvb0kifV0sImZvcm1hdCI6InRyZWVoYXNoIiwiaGFzaF9ibG9ja19zaXplIjo0MDk2fV0sIml0ZW1faWQiOiJoZm5rcGltbGhoZ2llYWRkZ2ZlbWpob2ZtZmJsbW5pYiIsIml0ZW1fdmVyc2lvbiI6IjUzNDUiLCJwcm90b2NvbF92ZXJzaW9uIjoxfQ","signatures":[{"header":{"kid":"publisher"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"DkCqhqZtm5nn1tYnzpbcothSNvmVdpOJaZW4m3Dhe188iM1tD2OkNtGJrPa6kbAZ3csxiEnv6tyGmF9CUeFskfQunyRLxHhXw3yWXR1e89qcZJMNZisopmrGjlHwXwCmuM7RRo5Qcjb2yIuTnAPg3gWBAcuoUsMoFVkGFxF77FpBnexNkh74V6-mQ-PwmhF1snqCI_mUUXlt9CDgVtCpIeHYgfGyqYIXRS-joe6D8z9OiWa9UsD2gxZPtxPjP4-6Hqs6RR1rUD7JkHKUoqdPbCvKFTjwkso1N39lsD6Eg0tWnxRZseY178aDKc-D3uFnYQsKSA632gFYMHQ28eTrIA"},{"header":{"kid":"webstore"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"LM43s6rOa8znJq_YQ4Gc_IM4gMNIB4lVHpcv5fCLJ8OPLLcLiAebdbaxqPlGMk8a98j5_1dpU3DzKaEudJaJZfrefS_lJXEX6N345OPJSCcGYxaKoePb3JAs6ck9pd__FhTDJ2RfwT4H2OBbbv6CwkQtRFmuFyRnGMMCIbUPPJd1Ip08odVqC14RqdefeNHGxVdx_zoeBKWFAgYFSoDsZn38PbHzUeVR3JIXHO49VhLfv-Tra7vJoHHiLSlAt2Tfffn2DwEm3ptmaCfbtgxIsOceb7Mos9jGPwbUJQ8XSGoeWXyVly3qCjaOd8BOU6mitSgntcX0ZN7_h3olw17QGw"}]}}]
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
1.1eee3e2bc90919b1b754fd95f8f6cb37c378f7227fb724b6ffb5233bcf5c3788
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "crl-set-9716886282698058642.data",
|
||||
"version": "5345"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"8/RrMmQlCD2Gsp14wUCE1P8r7B2C5+yE0+g79IPyRsc=": {
|
||||
"expiry": 1597868021.744813,
|
||||
"mode": "force-https",
|
||||
"sts_include_subdomains": false,
|
||||
"sts_observed": 1566332021.744818
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"8/RrMmQlCD2Gsp14wUCE1P8r7B2C5+yE0+g79IPyRsc=": {
|
||||
"expiry": 1597866661.90759,
|
||||
"mode": "force-https",
|
||||
"sts_include_subdomains": false,
|
||||
"sts_observed": 1566330661.907595
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"8/RrMmQlCD2Gsp14wUCE1P8r7B2C5+yE0+g79IPyRsc=": {
|
||||
"expiry": 1597879473.799381,
|
||||
"mode": "force-https",
|
||||
"sts_include_subdomains": false,
|
||||
"sts_observed": 1566343473.799385
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
MANIFEST-000001
|
@ -1,3 +0,0 @@
|
||||
2019/08/23-20:02:50.028 7bf Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/AutofillStrikeDatabase/MANIFEST-000001
|
||||
2019/08/23-20:02:50.028 7bf Recovering log #3
|
||||
2019/08/23-20:02:50.028 7bf Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/AutofillStrikeDatabase/000003.log
|
@ -1,3 +0,0 @@
|
||||
2019/08/20-19:24:33.126 40bb Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/AutofillStrikeDatabase/MANIFEST-000001
|
||||
2019/08/20-19:24:33.127 40bb Recovering log #3
|
||||
2019/08/20-19:24:33.127 40bb Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/AutofillStrikeDatabase/000003.log
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
MANIFEST-000001
|
@ -1,3 +0,0 @@
|
||||
2019/08/23-20:02:50.020 7bf Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/BudgetDatabase/MANIFEST-000001
|
||||
2019/08/23-20:02:50.020 7bf Recovering log #3
|
||||
2019/08/23-20:02:50.020 7bf Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/BudgetDatabase/000003.log
|
@ -1,3 +0,0 @@
|
||||
2019/08/20-19:24:33.112 40bb Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/BudgetDatabase/MANIFEST-000001
|
||||
2019/08/20-19:24:33.112 40bb Recovering log #3
|
||||
2019/08/20-19:24:33.112 40bb Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/BudgetDatabase/000003.log
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
MANIFEST-000001
|
@ -1,3 +0,0 @@
|
||||
2019/08/23-20:02:51.766 7be Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Extension State/MANIFEST-000001
|
||||
2019/08/23-20:02:51.766 7be Recovering log #3
|
||||
2019/08/23-20:02:51.767 7be Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Extension State/000003.log
|
@ -1,3 +0,0 @@
|
||||
2019/08/20-19:24:35.492 40b9 Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Extension State/MANIFEST-000001
|
||||
2019/08/20-19:24:35.492 40b9 Recovering log #3
|
||||
2019/08/20-19:24:35.493 40b9 Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Extension State/000003.log
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
MANIFEST-000001
|
@ -1,3 +0,0 @@
|
||||
2019/08/23-20:02:49.913 7bf Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/AvailabilityDB/MANIFEST-000001
|
||||
2019/08/23-20:02:49.914 7bf Recovering log #3
|
||||
2019/08/23-20:02:49.918 7bf Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/AvailabilityDB/000003.log
|
@ -1,3 +0,0 @@
|
||||
2019/08/20-19:24:32.932 40bb Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/AvailabilityDB/MANIFEST-000001
|
||||
2019/08/20-19:24:32.932 40bb Recovering log #3
|
||||
2019/08/20-19:24:32.933 40bb Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/AvailabilityDB/000003.log
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
MANIFEST-000001
|
@ -1,3 +0,0 @@
|
||||
2019/08/23-20:02:49.902 7bf Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/EventDB/MANIFEST-000001
|
||||
2019/08/23-20:02:49.902 7bf Recovering log #3
|
||||
2019/08/23-20:02:49.902 7bf Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/EventDB/000003.log
|
@ -1,3 +0,0 @@
|
||||
2019/08/20-19:24:32.928 40bb Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/EventDB/MANIFEST-000001
|
||||
2019/08/20-19:24:32.928 40bb Recovering log #3
|
||||
2019/08/20-19:24:32.929 40bb Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Feature Engagement Tracker/EventDB/000003.log
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
{"net":{"http_server_properties":{"servers":[{"https://accounts.google.com":{"supports_spdy":true}}],"version":5},"network_qualities":{"CAISE21lc2hhYmxlX21haW5fbm9tYXAYgICAgPj/////AQ==":"4G"}}}
|
@ -1 +0,0 @@
|
||||
MANIFEST-000001
|
@ -1,3 +0,0 @@
|
||||
2019/08/23-20:02:50.356 701 Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Platform Notifications/MANIFEST-000001
|
||||
2019/08/23-20:02:50.356 701 Recovering log #3
|
||||
2019/08/23-20:02:50.356 701 Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Platform Notifications/000003.log
|
@ -1,3 +0,0 @@
|
||||
2019/08/20-19:24:33.517 40b9 Reusing MANIFEST /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Platform Notifications/MANIFEST-000001
|
||||
2019/08/20-19:24:33.519 40b9 Recovering log #3
|
||||
2019/08/20-19:24:33.519 40b9 Reusing old log /media/longterm/go/src/github.com/eyedeekay/sam-forwarder/etc/samcatd/samcatd/Default/Platform Notifications/000003.log
|
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
Chromium settings and storage represent user-selected preferences and information and MUST not be extracted, overwritten or modified except through Chromium defined APIs.
|
@ -1 +0,0 @@
|
||||
{"protection":{"super_mac":"B613679A0814D9EC772F95D778C35FC5FF1697C493715653C6C712144292C5AD"}}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user