markdown paste #1

Open
opened 3 years ago by forest · 0 comments
forest commented 3 years ago
Owner

theres 5 processes here.

1.

a bash script which runs on the odroid and monitors the the wifi connection status, if it drops, it reboots the wifi device and tries again.

2.

the socks5 proxy which runs as an android app, it will listen on TCP 1080 and do whatever the client tells it with no authentication. Since the android app is the one talking to the internet, and it's opening a boring TCP socket just like any other app, the cell phone service provider cannot throttle this connection because they think it is "wifi tethering".

3.

threshold client which is configured to dial forestcapsul.cyberia.club on port 9056, but its also configured to do so through a socks5 proxy. Because the cell phone's tethering network gets a different IP every time I wasn't able to hard code the proxy address -- i made a feature where if you set the address to gateway:1080 then it will look in the route table at /proc/net/route and try any/all default routes' gateway IPs on port 1080.

When the threshold client connects to the threshold server, it sends the server a message looking like this:

[
      {
        "ClientId": "odroidxu4",
        "ListenAddress": "0.0.0.0",
        "ListenPort": 8081,
        "BackEndService": "http"
      },
      {
        "ClientId": "odroidxu4",
        "ListenAddress": "0.0.0.0",
        "ListenPort": 10022,
        "BackEndService": "ssh"
      }
  ]

Then the server will open ports 8081, 10022 and begin forwarding those to the client thru the tunnel.

the client also has this configuration:

    "ServiceToLocalAddrMap": {
      "ssh": "127.0.0.1:22",
      "http": "127.0.0.1:80",
      "https": "127.0.0.1:443"
    }

That way the client is in charge of what ports it is opening, and the server can only ask for services that are on the menu. (as opposed to the server specifying what port it wants to connect to).

4.

the threshold server which runs on the capsul at forestcapsul.cyberia.club. It listens for tunnel connections. Once the client connects and asks it to open ports, it then sends connect messages back through the tunnel to the client whenever someone connects to those ports.

5.

the nginx server running on the odroid is simply handling http requests that get tunneled to it through the threshold client

theres 5 processes here. ### 1. a bash script which runs on the odroid and monitors the the wifi connection status, if it drops, it reboots the wifi device and tries again. ### 2. the socks5 proxy which runs as an android app, it will listen on TCP 1080 and do whatever the client tells it with no authentication. Since the android app is the one talking to the internet, and it's opening a boring TCP socket just like any other app, the cell phone service provider cannot throttle this connection because they think it is "wifi tethering". ### 3. threshold client which is configured to dial forestcapsul.cyberia.club on port 9056, but its also configured to do so through a socks5 proxy. Because the cell phone's tethering network gets a different IP every time I wasn't able to hard code the proxy address -- i made a feature where if you set the address to `gateway:1080` then it will look in the route table at `/proc/net/route` and try any/all default routes' gateway IPs on port 1080. When the threshold client connects to the threshold server, it sends the server a message looking like this: ``` [ { "ClientId": "odroidxu4", "ListenAddress": "0.0.0.0", "ListenPort": 8081, "BackEndService": "http" }, { "ClientId": "odroidxu4", "ListenAddress": "0.0.0.0", "ListenPort": 10022, "BackEndService": "ssh" } ] ``` Then the server will open ports 8081, 10022 and begin forwarding those to the client thru the tunnel. the client also has this configuration: ``` "ServiceToLocalAddrMap": { "ssh": "127.0.0.1:22", "http": "127.0.0.1:80", "https": "127.0.0.1:443" } ``` That way the client is in charge of what ports it is opening, and the server can only ask for services that are on the menu. (as opposed to the server specifying what port it wants to connect to). ### 4. the threshold server which runs on the capsul at forestcapsul.cyberia.club. It listens for tunnel connections. Once the client connects and asks it to open ports, it then sends connect messages back through the tunnel to the client whenever someone connects to those ports. ### 5. the nginx server running on the odroid is simply handling http requests that get tunneled to it through the threshold client
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.