90 Commits

Author SHA1 Message Date
4107d12c92 Merge branch '5-create-sam-server-tunnels-in-trans-proxy' into 'master'
Resolve "Create SAM server tunnels in trans-proxy"

Closes #5

See merge request NamingThingsIsHard/privacy/i2p-docker-proxy!4
2021-01-06 21:46:35 +00:00
6f185ad576 docker: Activate server tunnel and point to correct i2pd host
#5 - Create SAM server tunnels in trans-proxy
2021-01-06 21:57:52 +01:00
19860d625e docker: fix iptables rule
We want to match by state, not by protocol.
Establish connections shouldn't be redirected

#5 - Create SAM server tunnels in trans-proxy
2021-01-06 21:57:21 +01:00
578ddfcecf trans-proxy: Use the correct env-vars for the server opts
#5 - Create SAM server tunnels in trans-proxy
2021-01-06 21:52:12 +01:00
4122b08e45 SAM: Use different sessions for the client and server
#5 - Create SAM server tunnels in trans-proxy
2021-01-06 21:51:30 +01:00
8e39a0ef10 Allow creating a server tunnel
This is untested for now until we can figure out how to send requests from another I2P instance

#5 - Create SAM server tunnels in trans-proxy
2021-01-06 15:01:59 +01:00
827e782672 Merge branch 'create-testnet' into 'master'
Create testnet

See merge request NamingThingsIsHard/privacy/i2p-docker-proxy!5
2021-01-06 13:59:12 +00:00
d8d05e614b docker: fix "contained" Dockerfile
We don't use pr0cks anymore
2021-01-05 19:37:04 +01:00
78d7f59c18 docker-compose: Remove i2pd-server
We can just connect to the the first i2pd service.
Additionally, the testnet also checks for the routerInfo of all routers.
2021-01-05 19:36:39 +01:00
cb1369a27f docker: forgo a reseeder
We simply don't need one now that we're sharing the netDb.
Additionally, it also allows us to leave "onBoot" away in the client config.
With it, client apps might started before it's possible to open tunnels
 since we have no active connections to other routers.
2021-01-05 19:26:14 +01:00
395683345a Add script to start HTTP server on I2PD container
There' still more configuration necessary to start the webserver tunnel
 that will point to the HTTP server.
2021-01-04 23:56:48 +01:00
1e68157f5f Use testnet in docker-compose.yml
Now the project will always start in the testnet instead of trying to connect
 to the live, production I2P environment.
This reduces startup time and allows faster testing.

In the future, it will be possible to automate tests and put them into the CI
2021-01-04 23:55:19 +01:00
ea92a7c1b2 docker: Start SAM and application tunnels automatically
Without onBoot they won't start for some reason.

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
072dab76a5 testnet.sh: Remove unnecessary log
#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
1afb4709f5 docker: Fix testnet not connecting
We now let I2P choose the UDP ports and also decide if it's firewalled or not.
Additionally, we add 2 floodfill routers.
We still have to determine if every router can be a floodfill router, but probably only 2 is cleaner.

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
157849332f testnet.sh: Fix routerInfo count check
Since IFS also has newline now, it was creating an array.
When simply echoing an array, it just echos the first element - always...
 there was thus always only 1 element.

That's fixed now.

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
a12db072ec docker: Remove reseeder and share netDb folder
Each router will add a router information file to the DB

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
659e7a519c docker: Add comments to i2p/Dockerfile
#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
9e36ece502 docker: Fix echo that replace printf
echo doesn't treat "\n" differently and prints it as is.
The resulting router config was thus bad.

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
72f56d8993 docker: Allow http reseed URL
Without it, I2P just filters out the HTTP reseed URLs

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
70b9416625 docker: rename volumes and add comments to docker-compose.test.yml
#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
cec69b918a docker: add configuration to connect I2P routers to a reseeder
The reseeder includes fixes to run from bisentenialwrug/i2p-reseed until the official image has merged them.
Fixes are:
  - autogenerating keys for TLS
  - calling the right command to start the reseeder

The I2P routers are also configured to reseed from a single reseed host.

And finally the keys the reseeder uses to sign the su3 payloads are shared in a volume with the I2P routers.

Unfortunately, it still doesn't work as the reseeder sends empty packers or something. Stil trying to figure that out.

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
d59d950048 Add start of basic config with reseeder
The reseeder doesn't work yet as we can't target it yet

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
9ae00e359c Fix i2p-docker image
There was an update to 0.9.48 and client.config was split into client.config.d/

#5 - Create SAM server tunnels in trans-proxy
2021-01-04 16:25:45 +01:00
4f37d470fa Merge branch '6-document-sam-client-tunnel' into 'master'
Resolve "Document SAM client tunnel"

Closes #6

See merge request NamingThingsIsHard/privacy/i2p-docker-proxy!3
2020-12-20 23:19:57 +00:00
7f80fdda61 Fix broken images in I2P-Peertube.drawio
They were links to web images instead of images themselves.
2020-12-21 00:15:54 +01:00
f1f95538cd Describe SAM and the functionality a little more 2020-12-21 00:00:37 +01:00
fb2c9c64e2 Update diagrams to use SAM 2020-12-20 23:51:56 +01:00
b6f3b4c398 Merge branch '4-investigate-extending-pr0xy-to-use-sam' into 'master'
Resolve "Investigate extending pr0xy to use SAM"

Closes #4

See merge request NamingThingsIsHard/privacy/i2p-docker-proxy!2
2020-12-18 22:43:56 +00:00
8dd3a6b81a Use geti2p Dockerfile
i2pd just didn't want to connect to other services for some reason.

#4 - Investigate extending pr0xy to use SAM
2020-12-18 23:35:11 +01:00
6ee38fd897 Add more debug logs to servers
#4 - Investigate extending pr0xy to use SAM
2020-12-18 23:30:13 +01:00
99138ab4fd cleanup: Remove pr0cks
We won't be using it anymore

#4 - Investigate extending pr0xy to use SAM
2020-12-14 22:56:22 +01:00
0033515500 docker: opt for purplei2p/i2pd
It just works as opposed to:

geti2p/i2p: Can't write /usr/share/i2p/router.info which stores peers
Something's wrong with the configuration and it should be trying to write to /var/lib/i2p/i2p-config/router.info

meeh/i2p.i2p: The themes for the router console aren't copied and the web UI just looks terrible

#4 - Investigate extending pr0xy to use SAM
2020-12-14 22:55:58 +01:00
9d0f03535a docker: Bind ./contained/bin for quick updates
Otherwise we'd have to rebuild the image every time

#4 - Investigate extending pr0xy to use SAM
2020-12-13 20:25:55 +01:00
c91f104248 docker: activate SAM in the i2p router service
Without it, nothing can work.

#4 - Investigate extending pr0xy to use SAM
2020-12-13 20:25:08 +01:00
f34807d911 Use asyncio.start_server instead of loop.create_server
The protocol_factory doesn't support `Protocol`s with async handlers
e.g `async def connection_made` won't actually be awaited and thus nothing ever happens.

Now there's a pretty ugly solution with one long-ass method, but maybe that can be trimmed
or a callable can be used.

#4 - Investigate extending pr0xy to use SAM
2020-12-13 20:23:42 +01:00
177a4ad5f7 cli: Rename the env vars for the params
It also shortens the command-line argument in exec.sh

#4 - Investigate extending pr0xy to use SAM
2020-12-13 20:19:58 +01:00
8026c04a7b Actually pass ip_dict to FakeResolver
It wasn't being passed so the client tunnel would just fail

#4 - Investigate extending pr0xy to use SAM
2020-12-13 20:18:29 +01:00
594554b12c deps: Update dnslib to 0.9.14 for python 3.9
The 0.9.10 was trying to call deprecated thread.isAlive() which isn't available
 in pthon 3.9 anymore

#4 - Investigate extending pr0xy to use SAM
2020-12-13 17:54:45 +01:00
77c2a69267 cli: Convert port params to int
Otherwise strings are passed and it can't start up.
Sockets can't be created when a string is passed as the port param

#4 - Investigate extending pr0xy to use SAM
2020-12-13 17:29:57 +01:00
0c4a9a81e3 Actually pass port param to transparent proxy
It was always starting on port 1234 when in fact, it had to start on 10080 (set in Dockerfile)

#4 - Investigate extending pr0xy to use SAM
2020-12-13 17:28:49 +01:00
3ea2f2a453 First implementation of transparent client tunnel using SAM
The transparent proxy creates a client tunnel to the requested destination for each client connection.
This is untested for now, but a server tunnel is also incoming if this works well.

#4 - Investigate extending pr0xy to use SAM
2020-12-13 00:09:17 +01:00
4dc8f22c29 docker: Update to the use of Python 3.9
Getting with the times

#4 - Investigate extending pr0xy to use SAM
2020-12-13 00:09:17 +01:00
ec8aeb5fb9 suggest LD_PRELOAD as a wrapper / proxy
It should be possible to replace networking functions, just like pr0xy
 and SocksiPy do to let all communication of a program pass through I2P

#4 - Investigate extending pr0xy to use SAM
2020-12-13 00:09:13 +01:00
37b949c1d3 Make getting an IP thread-safe
It can get called in quick succession and overwrite assignments if the
 checks aren't done at the right time

#4 - Investigate extending pr0xy to use SAM
2020-12-13 00:08:29 +01:00
bc4cbbcb55 Add doc with background on the project 2020-12-10 23:39:40 +01:00
1b625b26cc CI: cd actually carries state?
WTF?
2020-12-04 23:38:16 +01:00
9e1943f8be CI: WHERE THE HELL ARE THE DOCS? 2020-12-04 23:35:23 +01:00
e80b33ab41 CI: Yet another attempt to fix the pages task 2020-12-04 23:31:00 +01:00
a85f8b7ce6 CI: Another attempt at fixing drawio on 2020-12-04 22:54:33 +01:00