Skip to content

Tiny proxy server (~5Mb) to redirect http traffic to target host through proxy

License

Notifications You must be signed in to change notification settings

revenkroz/http-to-socks5-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP to SOCKS tiny proxy server

The idea is to have a proxy server that can be used to tunnel HTTP traffic to some server through a proxy (e.g. socks5 or http proxy). This is useful when you want to use a reverse proxy service to route traffic to a specific host without changing the client code (except base url).

Usage

Note: For all examples below we assume that the proxy server is socks5 proxy and the target server is https://api.example.com with authentication.

Executable usage

Add environment variables:

PROXY_DSN='socks5://test1:[email protected]:25000'
TARGET_HOST=https://api.example.com
DEFAULT_HEADERS='Authorization: Bearer test'
IGNORE_SSL=true

Run.

./app

Docker compose usage

version: '3.9'

services:
  api_example_com_proxy:
    image: ghcr.io/revenkroz/http-to-socks5-proxy:main
    container_name: proxy
    environment:
      PROXY_DSN: 'socks5://test1:[email protected]:25000'
      TARGET_HOST: https://api.example.com
      DEFAULT_HEADERS: 'Authorization: Bearer test'
      IGNORE_SSL: true
    ports:
        - "8080:8080"

About

Tiny proxy server (~5Mb) to redirect http traffic to target host through proxy

Topics

Resources

License

Stars

Watchers

Forks

Packages