more manager stuff, readme changes.

This commit is contained in:
idk
2018-09-12 16:52:50 -04:00
parent e9bc78e215
commit b34078bfd1
3 changed files with 53 additions and 33 deletions

View File

@ -31,6 +31,7 @@ generate tunnels from snippets of i2pd tunnel configuration files. That's kinda
useful. It appears to be more-or-less compatible with i2pd's tunnels.conf
format, but it only supports the following options:
[ephsite]
type = server
host = 127.0.0.1
port = 8081
@ -123,8 +124,15 @@ func main() { func main() {
Current limitations:
====================
Datagrams are still a work-in-progress. They're enabled, but I don't know for
sure how well they'll work yet. TCP is pretty good though.
I need to document it better soon. Since I'm making a damon to manage a bunch
of them, I'm going to do it later.
TCP is working very well. HTTP mode also exists, which just adds the X-I2P-DEST
headers in. It does this both ways, for applying the dest headers inbound to
identify clients to the server and outbound to identify servers to clients.
DestHash's don't get added correctly due to a bug in sam3 I think? I'm working
on making sure that's what it is. Datagrams are still a work-in-progress.
They're enabled, but I don't know for sure how well they'll work yet.
I'm in the process of adding client proxying to a specific i2p destination by
base32 or (pre-added)jump address. TCP works well. UDP exists, but is not
@ -149,12 +157,11 @@ I want it to be able to save ini files based on the settings used for a running
forwarder. Should be easy, I just need to decide how I want to do it. Also to
focus a bit more.
I've written a handful of example tools, but some of them might be better as
their own projects. An i2p-native static site generator in the style of jekyll
(but in go) could be cool.
Example tools built using this are being broken off into their own repos. Use
the other repos where appropriate, so I can leave the examples un-messed with.
It would be really awesome if I could make this run on Android. So I'll make
that happen eventually.
that happen eventually. I started a daemon for managing multiple tunnels and I
figure I give it a web interface to configure stuff with.
TLS configuration is experimental. It might not be possible(To multiplex http
and https on the same SAM tunnel).
TLS configuration is experimental.

View File

@ -34,6 +34,7 @@ generate tunnels from snippets of i2pd tunnel configuration files. That's kinda
useful. It appears to be more-or-less compatible with i2pd's tunnels.conf
format, but it only supports the following options:
[ephsite]
type = server
host = 127.0.0.1
port = 8081
@ -126,8 +127,15 @@ func main() { func main() {
Current limitations:
====================
Datagrams are still a work-in-progress. They're enabled, but I don't know for
sure how well they'll work yet. TCP is pretty good though.
I need to document it better soon. Since I'm making a damon to manage a bunch
of them, I'm going to do it later.
TCP is working very well. HTTP mode also exists, which just adds the X-I2P-DEST
headers in. It does this both ways, for applying the dest headers inbound to
identify clients to the server and outbound to identify servers to clients.
DestHash's don't get added correctly due to a bug in sam3 I think? I'm working
on making sure that's what it is. Datagrams are still a work-in-progress.
They're enabled, but I don't know for sure how well they'll work yet.
I'm in the process of adding client proxying to a specific i2p destination by
base32 or (pre-added)jump address. TCP works well. UDP exists, but is not
@ -152,23 +160,22 @@ I want it to be able to save ini files based on the settings used for a running
forwarder. Should be easy, I just need to decide how I want to do it. Also to
focus a bit more.
I've written a handful of example tools, but some of them might be better as
their own projects. An i2p-native static site generator in the style of jekyll
(but in go) could be cool.
Example tools built using this are being broken off into their own repos. Use
the other repos where appropriate, so I can leave the examples un-messed with.
It would be really awesome if I could make this run on Android. So I'll make
that happen eventually.
that happen eventually. I started a daemon for managing multiple tunnels and I
figure I give it a web interface to configure stuff with.
TLS configuration is experimental. It might not be possible(To multiplex http
and https on the same SAM tunnel).
TLS configuration is experimental.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAluZeGEACgkQ11wDs5te
FOHldQf9Gl6pSJjVNe+9kHGP7VhuDRLA1XsN/ZIPqDeCeoOVqbg00iL7rgnO8TN9
rI21YVSf9mEW/apUc3Xs7tyRgVrMkzlO/EZRM9axYlApWUtdpWIUqZjzl6NCt2dt
4hM55bQG8h04GTNxqKxs68YhHVlI7dQUHMMf4V7dF1NrbDdpJeTlEM3Gw6qwfThE
t6pbcJZwnBGGuBsvxukB0dbXB0ojtZQR/ce4QeuKD5ZHhwp1d+XHQGYZ927JkiLN
NRyFYi5kMuWRs/JZU24tSt/oY88nDjS0/q8hwYiOQJmbW9Rth7q2Ampdohg3lFek
O+YgsXsGrDPxRDCfbAmMjQuBzRWcAw==
=n16S
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAluZfJ8ACgkQ11wDs5te
FOFs7Af+MBxdl5mpBdU95sv2DWwd+6fq9473mKATatIgMV92nBb0wGLxmCG0mLhy
GMi/kcxv0lN9fq8F+kRi5NIiji00QHwlzVcDzabqR2d5BAsxG1pG0WdlsPcD2SL1
9Kq89K8cAj/QfZgmnc1uo3gyxoh/SD9kr3aMJx1E1kzL3D+aISOqM1Mjv/m43Cqq
TJT+OEfO6ihx9E/beqcwalm/7HcfJZ3bYQwvKhs9AGDfZhV21SH2rAAwAXRcRkv4
3tIx4QilC0zMnwNw2Kc0tVnAkKVgvZ2rUBLVd8rHAekednkz7S73Nc/Z+RyNF9mo
scsCByVy1KDs8VyMGOSMqpXmrF69OQ==
=F5Y+
-----END PGP SIGNATURE-----

View File

@ -2,8 +2,8 @@ package sammanager
import (
"context"
"log"
"net"
"log"
)
import (
@ -53,9 +53,9 @@ func (s *SAMManager) FindForwarder(lookup string) (bool, int, string) {
}
func (s *SAMManager) LookupForwarder(lookup string, label ...string) (bool, string) {
for _, l := range s.config.Labels {
log.Println(l)
}
for _, l := range s.config.Labels {
log.Println(l)
}
return false, ""
}
@ -64,15 +64,15 @@ func (s *SAMManager) Dial(ctx context.Context, network, address string) (*net.Co
}
func NewSAMManagerFromOptions(opts ...func(*SAMManager) error) (*SAMManager, error) {
var s SAMManager
s.FilePath = "tunnels.ini"
var s SAMManager
s.FilePath = "tunnels.ini"
s.save = true
s.config = i2ptunconf.NewI2PBlankTunConf()
s.ServerHost = "localhost"
s.ServerPort = "7957"
s.SamHost = "localhost"
s.SamPort = "7656"
for _, o := range opts {
for _, o := range opts {
if err := o(&s); err != nil {
return nil, err
}
@ -80,6 +80,12 @@ func NewSAMManagerFromOptions(opts ...func(*SAMManager) error) (*SAMManager, err
return nil, nil
}
func (s *SAMManager) NewSAMManager(inifile, servhost, servpost, samhost, samport string) (*SAMManager, error) {
return NewSamManagerFromOptions()
func (s *SAMManager) NewSAMManager(inifile, servhost, servport, samhost, samport string) (*SAMManager, error) {
return NewSamManagerFromOptions(
SetManagerFilePath(inifile),
SetManagerHost(servhost),
SetManagerPort(servport),
SetManagerSAMHost(samhost),
SetManagerSAMPort(samport),
)
}