redlib icon indicating copy to clipboard operation
redlib copied to clipboard

💡 Feature request: HTTP / SOCKS proxy support

Open Sommerwiesel opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Please describe

Mitigates against Reddit rate limiting or blocking the server IP. Would love to have my redlib instance use a proxy for that reason.

Describe the feature you would like to be implemented

Native support for HTTP / SOCKS proxy in the redlib binary / docker image.

Describe alternatives you've considered

Setting docker / system proxy but redlib seems to ignore that as other have already reported here: https://github.com/redlib-org/redlib/issues/184

Additional context / screenshot

There is already a FR tor tunneling support (and socks support in the comments) here: https://github.com/redlib-org/redlib/issues/1

Sommerwiesel avatar Dec 01 '24 20:12 Sommerwiesel

Might be helpful: hyper_socks2.

APT37 avatar Dec 15 '24 11:12 APT37

temporary workaround, but if you set up a tun2socks proxy container and then use service networking, this works.

karimroshan avatar Dec 30 '24 15:12 karimroshan

temporary workaround, but if you set up a tun2socks proxy container and then use service networking, this works.

Actually good idea, will try that out. Thanks for the info :)

Sommerwiesel avatar Dec 30 '24 17:12 Sommerwiesel

no problem! it took me a little while to puzzle through it.

here is the compose file in case you want it

services:
  proxy:
    image: ghcr.io/xjasonlyu/tun2socks:latest
    restart: unless-stopped
    env_file: ./config/proxy/.env
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    networks:
      - default
      - routing_warp
    sysctls:
      - net.ipv4.ip_forward=1
    healthcheck:
      test:
        - CMD
        - wget
        - --spider
        - -q
        - --tries=1
        - https://ifconfig.me
      timeout: 3s

karimroshan avatar Dec 30 '24 17:12 karimroshan

After 1.5 months of using karimroshans workaround (tun2socks container), I can only say, it is not stable and reliable enough for production use.

Therefore, bump, can you please consider making this feature native in redlib? @APT37 already proposed using hyper_socks2 and as far as I can see, it shouldn't be this hard to include.

I have sadly never worked with Rust or I would create a PR myself.

@sigaloid pinging you as the main contributor. Please, make this happen sometime soon. (my) redlib is becoming unusable without a proper proxy (many daily rate limits).

Sommerwiesel avatar Feb 15 '25 11:02 Sommerwiesel