23 Commits

Author SHA1 Message Date
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
6ee38fd897 Add more debug logs to servers
#4 - Investigate extending pr0xy to use SAM
2020-12-18 23:30:13 +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
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
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
5244b6d735 Try to cleanup unix socket
#1 - Forward using iptables, pr0xy and custom DNS
2019-07-29 18:31:56 +02:00
f4180900c0 Use the vars from the Dockerfile
#1 - Forward using iptables, pr0xy and custom DNS
2019-07-29 17:52:20 +02:00
fec320b178 Add host arg for send.py
#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 22:29:21 +02:00
29d8d5c945 Replace netfilterqueue by modifying pr0cks to make the initial connection request
We only want i2p to create a tunnel to the requested host on i2p.
There's no need to modify any other packets at the moment

#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 22:15:03 +02:00
0d54221b32 Drop the DNS requests to stop multiple requests from the requester
#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 22:11:13 +02:00
a485e3d9eb Move send.py and fix it up for use docker to test direct requests to i2p HTTP proxy
#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 21:37:25 +02:00
09597a2703 Remove trailing '.' from the hostname passed from DNS request
#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 21:36:17 +02:00
221d2641d4 Handle requests to unix socket better and log errors
#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 21:35:35 +02:00
88bf17ca8c Try to shutdown the UnixSocketServer when our program exits
Also add logging

#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 21:34:45 +02:00
e04e2989e5 Redirect traffic to NFQUEUE
Right now all it does is print the packet payload. Need to find out wtf
 that actually is and how to treat it

#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 00:08:35 +02:00
25525d2ae6 Add simple netfilter script with its dependencies
- python requirements are now kept in a file and installed during build
 - variables are used in exec.sh to remove magic values
 - executable scripts are moved into one directory

#1 - Forward using iptables, pr0xy and custom DNS
2019-07-27 00:07:09 +02:00