Removed unnecessary check on tunnel type with new default.
This commit is contained in:
2
Makefile
2
Makefile
@ -157,7 +157,7 @@ example-config:
|
||||
@echo "-s flag.)" >> USAGE.md
|
||||
@echo "" >> USAGE.md
|
||||
@echo '``` ini' >> USAGE.md
|
||||
cat etc/sam-forwarder/tunnels.ini >> USAGE.md
|
||||
cat etc/samcatd/tunnels.ini >> USAGE.md
|
||||
@echo '```' >> USAGE.md
|
||||
@echo "" >> USAGE.md
|
||||
cp USAGE.md docs/USAGE.md
|
||||
|
@ -81,12 +81,12 @@ I'm eventually going to make the manager implement net.Conn. This won't be
|
||||
exposed in the default application probably though, but rather as a library.
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAluiX0YACgkQ11wDs5te
|
||||
FOHenAf9HVjftsGzqfN7uSVyGTiwiCBGO6a5YuOO/1IzDkAgo9hNa7AStNyikZSO
|
||||
K6iQgadP9kW1dsYctM3/HOwubhemYRDntJyEG/gVgdDuOwQgJQm1l/HLrgkPEqzr
|
||||
jArbjtfn8dTY5eoBjxQlwzOttf/cjHeFMML1tdFvIyaGWktgFolxKrZIwDfXoWzX
|
||||
RDqTSMJtPV2Y8mknWruknxZuqmsCTK9d880hvIpC7oKBdBqihtGlOclA5zTl7W7D
|
||||
IcgN1hzmhZusBM6oB5CcgacS+UlcFy0y8PM05zWLqGdUIgLyOKhA8JoPByZENPs/
|
||||
WBIRpTk/YtpwxB1ubBUEKrGbItxX1g==
|
||||
=KTgr
|
||||
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAluiZnMACgkQ11wDs5te
|
||||
FOE+JAf7BGlKlsfLh0TrvIv7TC/Vo2jLKKID7yJ+aVzEnhYITAgE2R/sFyKf/mXs
|
||||
IqSqi8G32IVTm3W7YDDREjUIzSGsED5/iv7eD/aJDpnzJppvNtiYrcBbNKobQy3A
|
||||
SdJbZdu26cINEP4kagCzEqubWGs4cKkqQ0TaRdbImIopXCJNCbkWBFUiCjzxg8pw
|
||||
S46XdMZU/DFxWmP/qDDQ6qhdiDjnkU2UdYpgKG/GTu3SuULac7zAA2kV+Kxjsn8G
|
||||
6pACsxlH+Nz3T2PeYide+HXD8kR4HB1neaUBzn6LQks1M4PyoEWGMIpqRNwTTv99
|
||||
Jx6/WSLsaiUcM6N2Q+f1hhKHexFVBQ==
|
||||
=TeNO
|
||||
-----END PGP SIGNATURE-----
|
||||
|
2
USAGE.md
2
USAGE.md
@ -153,6 +153,8 @@ Usage of ./bin/samcatd:
|
||||
(Currently inoperative. Target TLS port(HTTPS Port of service to forward to i2p)
|
||||
-u UDP mode(true or false)
|
||||
-w Start web administration interface
|
||||
-wp string
|
||||
Web port (default "7957")
|
||||
-x Close tunnel idle(true or false)
|
||||
-z Uze gzip(true or false)
|
||||
-zi
|
||||
|
@ -153,6 +153,8 @@ Usage of ./bin/samcatd:
|
||||
(Currently inoperative. Target TLS port(HTTPS Port of service to forward to i2p)
|
||||
-u UDP mode(true or false)
|
||||
-w Start web administration interface
|
||||
-wp string
|
||||
Web port (default "7957")
|
||||
-x Close tunnel idle(true or false)
|
||||
-z Uze gzip(true or false)
|
||||
-zi
|
||||
|
@ -134,6 +134,8 @@ Usage of ./bin/samcatd:
|
||||
(Currently inoperative. Target TLS port(HTTPS Port of service to forward to i2p)
|
||||
-u UDP mode(true or false)
|
||||
-w Start web administration interface
|
||||
-wp string
|
||||
Web port (default "7957")
|
||||
-x Close tunnel idle(true or false)
|
||||
-z Uze gzip(true or false)
|
||||
-zi
|
||||
|
@ -134,6 +134,8 @@ Usage of ./bin/samcatd:
|
||||
(Currently inoperative. Target TLS port(HTTPS Port of service to forward to i2p)
|
||||
-u UDP mode(true or false)
|
||||
-w Start web administration interface
|
||||
-wp string
|
||||
Web port (default "7957")
|
||||
-x Close tunnel idle(true or false)
|
||||
-z Uze gzip(true or false)
|
||||
-zi
|
||||
|
@ -241,10 +241,10 @@ func NewSAMManagerFromOptions(opts ...func(*SAMManager) error) (*SAMManager, err
|
||||
}
|
||||
}
|
||||
if len(s.config.Labels) == 0 || s.start {
|
||||
t, b := s.config.Get("type")
|
||||
/* t, b := s.config.Get("type")
|
||||
if !b {
|
||||
return nil, fmt.Errorf("samcat was instructed to start a tunnel with insufficient default settings information.")
|
||||
}
|
||||
}*/
|
||||
switch t {
|
||||
case "http":
|
||||
if f, e := i2ptunconf.NewSAMForwarderFromConfig(s.FilePath, s.SamHost, s.SamPort); e == nil {
|
||||
|
@ -45,7 +45,7 @@ func TestOption2(t *testing.T) {
|
||||
SetManagerSAMPort("7656"),
|
||||
SetManagerWebHost("127.0.0.1"),
|
||||
SetManagerWebPort("7960"),
|
||||
SetManagerFilePath("../etc/samcatd/tunnels.ini"),
|
||||
SetManagerFilePath("../etc/sam-forwarder/tunnels.ini"),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("NewSAMManager() Error: %q\n", err)
|
||||
|
Reference in New Issue
Block a user