Giter Club home page Giter Club logo

dumbproxy's Introduction

dumbproxy

dumbproxy

Dumbest HTTP proxy ever.

Features

  • Cross-platform (Windows/Mac OS/Linux/Android (via shell)/*BSD)
  • Deployment with a single self-contained binary
  • Zero-configuration
  • Supports CONNECT method and forwarding of HTTPS connections
  • Supports Basic proxy authentication
  • Supports TLS operation mode (HTTP(S) proxy over TLS)
  • Native ACME support (can issue TLS certificates automatically using Let's Encrypt or BuyPass)
  • Supports client authentication with client TLS certificates
  • Supports HTTP/2
  • Resilient to DPI (including active probing, see hidden_domain option for authentication providers)
  • Connecting via upstream HTTP(S)/SOCKS5 proxies (proxy chaining)
  • systemd socket activation

Installation

Binary download

Pre-built binaries available on releases page.

From source

Alternatively, you may install dumbproxy from source. Run within source directory

go install

Docker

Docker image is available as well. Here is an example for running proxy as a background service:

docker run -d \
    --security-opt no-new-privileges \
    -p 8080:8080 \
    --restart unless-stopped \
    --name dumbproxy \
    ghcr.io/senseunit/dumbproxy

Snap Store

Get it from the Snap Store

sudo snap install dumbproxy

Usage

Just run program and it'll start accepting connections on port 8080 (default).

Example: plain proxy

Run proxy on port 1234 with Basic authentication with username admin and password 123456:

dumbproxy -bind-address :1234 -auth 'static://?username=admin&password=123456'

Example: HTTP proxy over TLS (LetsEncrypt automatic certs)

Run HTTPS proxy (HTTP proxy over TLS) with automatic certs from LetsEncrypt on port 443 with Basic authentication with username admin and password 123456:

dumbproxy -bind-address :443 -auth 'static://?username=admin&password=123456' -autocert

Example: HTTP proxy over TLS (BuyPass automatic certs)

Run HTTPS proxy (HTTP proxy over TLS) with automatic certs from BuyPass on port 443 with Basic authentication with username admin and password 123456:

dumbproxy \
	-bind-address :443 \
	-auth 'static://?username=admin&password=123456' \
	-autocert \
	-autocert-acme 'https://api.buypass.com/acme/directory' \
	-autocert-email [email protected] \
	-autocert-http :80

Using HTTP-over-TLS proxy

It's quite trivial to set up program which supports proxies to use dumbproxy in plain HTTP mode. However, using HTTP proxy over TLS connection with browsers is little bit tricky. Note that TLS must be enabled (-cert and -key options or -autocert option) for this to work.

Routing all browsers on Windows via HTTPS proxy

Open proxy settings in system's network settings:

win10-proxy-settings

Turn on setup script option and set script address:

data:,function FindProxyForURL(u, h){return "HTTPS example.com:8080";}

where instead of example.com:8080 you should use actual address of your HTTPS proxy.

Note: this method will not work with MS Edge Legacy.

Using with Firefox

Option 1. Inline PAC file in settings.

Open Firefox proxy settings, switch proxy mode to "Automatic proxy configuration URL". Specify URL:

data:,function FindProxyForURL(u, h){return "HTTPS example.com:8080";}

ff_https_proxy

Option 2. Browser extension.

Use any proxy switching browser extension which supports HTTPS proxies like this one.

Using with Chrome

Option 1. CLI option.

Specify proxy via command line:

chromium-browser --proxy-server='https://example.com:8080'

Option 2. Browser extension.

Use any proxy switching browser extension which supports HTTPS proxies like this one.

Using with other applications

It is possible to expose remote HTTPS proxy as a local plaintext HTTP proxy with help of external application which performs remote communication via TLS and exposes local plaintext socket. steady-tun appears to be most suitable for this because it supports connection pooling to hide connection delay.

Using with Android

  1. Run proxy as in examples above.
  2. Install Adguard on your Android: Guide.
  3. Follow this guide, skipping server configuration. Use proxy type HTTPS if you set up TLS-enabled server or else use HTTP type.
  4. Enjoy!

Authentication

Authentication parameters are passed as URI via -auth parameter. Scheme of URI defines authentication metnod and query parameters define parameter values for authentication provider.

  • none - no authentication. Example: none://. This is default.
  • static - basic authentication for single login and password pair. Example: static://?username=admin&password=123456. Parameters:
    • username - login.
    • password - password.
    • hidden_domain - if specified and is not an empty string, proxy will respond with "407 Proxy Authentication Required" only on specified domain. All unauthenticated clients will receive "400 Bad Request" status. This option is useful to prevent DPI active probing from discovering that service is a proxy, hiding proxy authentication prompt when no valid auth header was provided. Hidden domain is used for generating 407 response code to trigger browser authorization request in cases when browser has no prior knowledge proxy authentication is required. In such cases user has to navigate to any hidden domain page via plaintext HTTP, authenticate themselves and then browser will remember authentication.
  • basicfile - use htpasswd-like file with login and password pairs for authentication. Such file can be created/updated with command like this: dumbproxy -passwd /etc/dumbproxy.htpasswd username password or with htpasswd utility from Apache HTTPD utils. path parameter in URL for this provider must point to a local file with login and bcrypt-hashed password lines. Example: basicfile://?path=/etc/dumbproxy.htpasswd.
    • path - location of file with login and password pairs. File format is similar to htpasswd files. Each line must be in form <username>:<bcrypt hash of password>. Empty lines and lines starting with # are ignored.
    • hidden_domain - same as in static provider
    • reload - interval for conditional password file reload, if it was modified since last load. Use negative duration to disable autoreload. Default: 15s.
  • cert - use mutual TLS authentication with client certificates. In order to use this auth provider server must listen sockert in TLS mode (-cert and -key options) and client CA file must be specified (-cacert). Example: cert://.

Synopsis

$ ~/go/bin/dumbproxy -h
Usage of /home/user/go/bin/dumbproxy:
  -auth string
    	auth parameters (default "none://")
  -autocert
    	issue TLS certificates automatically
  -autocert-acme string
    	custom ACME endpoint (default "https://acme-v02.api.letsencrypt.org/directory")
  -autocert-dir string
    	path to autocert cache (default "/home/user/.dumbproxy/autocert")
  -autocert-email string
    	email used for ACME registration
  -autocert-http string
    	listen address for HTTP-01 challenges handler of ACME
  -autocert-whitelist value
    	restrict autocert domains to this comma-separated list
  -bind-address string
    	HTTP proxy listen address. Set empty value to use systemd socket activation. (default ":8080")
  -cafile string
    	CA file to authenticate clients with certificates
  -cert string
    	enable TLS and use certificate
  -ciphers string
    	colon-separated list of enabled ciphers
  -disable-http2
    	disable HTTP2
  -ip-hints string
    	a comma-separated list of source addresses to use on dial attempts. "$lAddr" gets expanded to local address of connection. Example: "10.0.0.1,fe80::2,$lAddr,0.0.0.0,::"
  -key string
    	key for TLS certificate
  -list-ciphers
    	list ciphersuites
  -max-tls-version value
    	maximum TLS version accepted by server (default TLS13)
  -min-tls-version value
    	minimal TLS version accepted by server (default TLS12)
  -passwd string
    	update given htpasswd file and add/set password for username. Username and password can be passed as positional arguments or requested interactively
  -passwd-cost int
    	bcrypt password cost (for -passwd mode) (default 4)
  -proxy value
    	upstream proxy URL. Can be repeated multiple times to chain proxies. Examples: socks5h://127.0.0.1:9050; https://user:[email protected]:443
  -timeout duration
    	timeout for network operations (default 10s)
  -user-ip-hints
    	allow IP hints to be specified by user in X-Src-IP-Hints header
  -verbosity int
    	logging verbosity (10 - debug, 20 - info, 30 - warning, 40 - error, 50 - critical) (default 20)
  -version
    	show program version and exit

See Also

dumbproxy's People

Contributors

dependabot[bot] avatar ganzm avatar snawoot avatar tiaga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dumbproxy's Issues

Подскажите как добавить сертификаты

Здравствуйте!
Подскажите, пожалуйста, как добавить сертификаты.
Такой вариант не работает:
dumbproxy -cert /etc/letsencrypt/live/xxx/fullchain.pem -key /etc/letsencrypt/live/xxx/privkey.pem
Получаю ошибку:
main.go:80: CRITICAL TLS config construction failed:

Как настроить через докер?

Привет, подскажи, после запуска контейнера в докере, что надо сделать, чтобы настроить HTTPS прокси?
Не совсем понятно.
Хотел запустить эту команду внутри контейнера

dumbproxy -bind-address :443 -auth 'static://?username=admin&password=123456' -autocert

Но не пускает в контейнер

root@HTTPS-proxy:~# docker exec -it dumbproxy bash
OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown

Может команда для поднятия контейнера для HTTPS прокси иначе должна быть, в общем нужна подробнее инструкция. Спасибо)

Alpine based Docker Image

Sometimes it's required to start dumbproxy in a container with a small delay (for example, if we're waiting for a network interface in order to map ports on it). I assume that with Alpine image it'll be easier (rather than implement the -sleep option, which has nothing common with the main application functionality).

Is it possible that I'll add a build based on Alpine to the repo?

Не работает с программами Proxyfire, ProxyCap

image

Логи Proxyfire:

[57:37] Testing Started.
  Proxy Server
  Address:  xxxxxxxxxxx:1443
  Protocol:  HTTPS
  Authentication: Basic
  Username:  proxy

[57:37] Starting: Test 1: Connection to the Proxy Server
[57:37] IP Address: xx.xx.xx.xx
[57:37] Connection established
[57:37] Test passed.
[57:37] Starting: Test 2: Connection through the Proxy Server
[57:37] Error : connection to the proxy server was closed unexpectedly.
  Please make sure that the proxy server protocol and address are correct.
[57:37] Test failed.
[57:37] Testing Finished.

Логи dumbproxy:

HTTPSRV : 2023/12/03 11:57:39 server.go:3212: http: TLS handshake error from xx.xx.xx.xx:1434: tls: first record does not look like a TLS handshake

Запускаю так:
/usr/local/bin/dumbproxy -auth basicfile://?path=/etc/dumbproxy.htpasswd -bind-address :1443 -cert /etc/letsencrypt/live/xxxx/fullchain.pem -key /etc/letsencrypt/live/xxxx/privkey.pem

В браузере прокси работает.
Proxifire с платными https прокси работает.

Куда копать?

Возможно ли подключение к вышестоящему прокси в той же системе?

Приветствую!
Собственно вопрос. В системе уже есть прокси (squid, privoxy и т.п), который работает по правилам фильтрации сайтов и т.п. Нужно просто подключиться с мобильного устройства к своему маршрутизатору, где всё это настроено. Спасибо.

What is a "plain proxy"?

Do I understand correctly that when I run such a command line, I will get a regular http proxy without traffic encryption?

dumbproxy -bind-address :1234 -auth 'static://?username=admin&password=123456'

GUI: Create TUN, Proxy all traffic

Wintun
ligolo-ng
wireguard TUN
Universal TUN/TAP driver
tun2socks
tun2proxy
https://www.kernel.org/doc/html/v6.1/networking/tuntap.html
https://man.freebsd.org/cgi/man.cgi?query=tun

TUN acts as an agent for existing agreements, HTTP proxy HTTPS proxy SOCKS proxy
Use TUN mode to proxy all traffic throughout the system, including terminals

Why this request?

I’m in a country where the internet is very blocked, and upgrading OS or downloading software is a hassle, github gitlab Ping over time 300ms.

In thousands of Linux and BSD distributions, there is no single system desktop environment that proxies all traffic,

acme/autocert: unable to satisfy for domain: no viable challenge type found

docker run -d \
    --security-opt no-new-privileges \
    -p 443:443 \
    --restart unless-stopped \
    --name dumbproxy \
    yarmak/dumbproxy -bind-address :443 -auth 'static://?username=USER&password=PASSWD' -autocert

При

curl -v -x 'https://USER:PASSWD@DOMAIN:443' http://ifconfig.co

выдаёт

*   Trying 1.2.3.4:443...
* Connected to (nil) (1.2.3.4) port 443 (#0)
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Unknown (21):
* TLSv1.3 (IN), TLS alert, internal error (592):
* error:0A000438:SSL routines::tlsv1 alert internal error
* Closing connection 0
curl: (35) error:0A000438:SSL routines::tlsv1 alert internal erro

В логах

MAIN    : 2023/04/03 18:12:54 main.go:173: INFO     Starting proxy server...
MAIN    : 2023/04/03 18:12:54 main.go:232: INFO     Proxy server started.
HTTPSRV : 2023/04/03 18:13:09 server.go:3215: http: TLS handshake error from 18.216.99.30:54400: tls: client requested unsupported application protocols ([acme-tls/1])
HTTPSRV : 2023/04/03 18:13:09 server.go:3215: http: TLS handshake error from 23.178.112.102:36054: tls: client requested unsupported application protocols ([acme-tls/1])
HTTPSRV : 2023/04/03 18:13:09 server.go:3215: http: TLS handshake error from 35.164.222.78:47986: tls: client requested unsupported application protocols ([acme-tls/1])
HTTPSRV : 2023/04/03 18:13:10 server.go:3215: http: TLS handshake error from 1.2.3.4:54026: acme/autocert: unable to satisfy "https://acme-v02.api.letsencrypt.org/acme/authz-v3/..." for domain "DOMAIN": no viable challenge type found

Ability to set allowed/denied hosts

Please make it possible to set allowed/denied hosts lists for HTTP/HTTPS proxies

  • --allowed-hosts - list of allowed hosts, to which user can connect via proxy (comma-separated, without spaces, for example - "google.com,*.google.com,fb.com"). All other hosts will be denied, if this parameter is provided

--denied-hosts - list of denied hosts (comma-separated, without spaces, for example - "google.com,*.google.com,fb.com"). All others hosts will be allowed, if this parameter is provided

не удаётся подключиться с сертификатами

Без аутентификации всё в норме.
Серверные сертификаты (от Let's Encrypt) сходу работают (например, в связке с -auth "static://?username=user&password=1234").
На самоподписанный клиентский программы ругаться перестают после добавления ca.pem в список доверенных корневых (x509: certificate signed by unknown authority).

Но реальная проблема пришла откуда не ждали. Провайдер перехватывает сертификаты и подменяет на свои (steady-tun: x509: certificate has expired or is not yet valid: current time 2021-02-25T14:55:50+03:00 is after 2018-02-07T07:50:50Z;
ptw: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain).

Аналогичная проблема с доступом к своему веб-серверу Apache, расположенному на одном хосте с dumbproxy, решилась просто - убрал лишнее из параметра SSLCipherSuite. Например, TLS_CHACHA20_POLY1305_SHA256 посредник не перехватывает, а TLS_AES_128_GCM_SHA256 ломает.

В связи с этим, прошу добавить параметр для ограничения списка возможных механизмов обмена ключами.

TLS handshake error

Использовал команду

docker run -d \
    --security-opt no-new-privileges \
    -p 443:443 \
    --restart unless-stopped \
    --name dumbproxy \
    yarmak/dumbproxy -bind-address :443 -auth 'static://?username=admin&password=123456' -autocert

Подвязал домен на IP сервера, запускаю такие команды на локалке для проверки прокси

curl -x 'https://admin:[email protected]' https://ifconfig.co
curl -x 'https://admin:[email protected]:443' https://ifconfig.co

На выходе такая ошибка
curl: (35) error:1404B438:SSL routines:ST_CONNECT:tlsv1 alert internal error

Если запустить так

curl -x 'https://admin:[email protected]:8080' https://ifconfig.co

то долго выполняется запрос и на выходе
curl: (28) Failed to connect to mydomain.tk port 8080 after 75845 ms: Couldn't connect to server

В логах контейнера такое

MAIN    : 2023/02/19 18:47:07 main.go:172: INFO     Starting proxy server...
HTTPSRV : 2023/02/19 18:47:29 server.go:3215: http: TLS handshake error from myip:58889: mkdir /.dumbproxy: permission denied
HTTPSRV : 2023/02/19 18:48:34 server.go:3215: http: TLS handshake error from myip:23771: mkdir /.dumbproxy: permission denied
HTTPSRV : 2023/02/19 18:48:53 server.go:3215: http: TLS handshake error from myip:13598: acme/autocert: missing certificate
HTTPSRV : 2023/02/19 18:48:53 server.go:3215: http: TLS handshake error from myip:37974: acme/autocert: missing certificate
HTTPSRV : 2023/02/19 18:49:29 server.go:3215: http: TLS handshake error from myip:2643: acme/autocert: missing certificate
HTTPSRV : 2023/02/19 18:49:29 server.go:3215: http: TLS handshake error from myip:26594: acme/autocert: missing certificate

Support whitelist urls

Hi!
Is it possible to set a list of allowed addresses to which you can go through this proxy

For example:

google.com
*.google.com

Failed to start Dumbiest HTTP proxy

Hello, i have problems to start the proxy with a new version version v1.12.0

systemd[1]: dumbproxy.service: Scheduled restart job, restart counter is at 5.
Stopped Dumbiest HTTP proxy ever.
dumbproxy.service: Start request repeated too quickly.
dumbproxy.service: Failed with result 'exit-code'.
Failed to start Dumbiest HTTP proxy ever.

CRITICAL TLS config construction failed: tls: failed to parse private key

Создаю самоподписаный сертификат командой: openssl req -x509 -newkey rsa:2048 -keyout key.key -out cert.crt -days 3650
Далее использую данную команду для запуска прокси: ./dumbproxy -bind-address :443 -auth 'static://?username=admin&password=123456' -cert cert.crt -key key.key

Ошибка: MAIN : 2024/01/09 10:44:37 main.go:177: INFO Starting proxy server... MAIN : 2024/01/09 10:44:37 main.go:208: CRITICAL TLS config construction failed: tls: failed to parse private key root@static:~/proxy#

Мне бы хотелось бы использовать https прокси без доменному имени

Using custom certficate files

I have cert.crt and private.key SSL/TLS certificate files for my domain from cloudflare. Is it possible to use them here?

Сертификаты

Добрый день!

Прописал сертификаты, которые были получены по средствам скрипта acme.sh:

Запускаю прокси, следующей командой

./dumbproxy -cert /root/.acme.sh/abababa.ru_ecc/fullchain.cer -key /root/.acme.sh/abababa_ecc/abababa.ru.key -cafile /root/.acme.sh/abababa.ru_ecc/ca.cer

Всё отлично стартует, но при попытке подключиться к прокси выдаёт ошибку:

HTTPSRV : 2023/09/01 20:47:53 server.go:3215: http: TLS handshake error from a.b.c.d:54806: tls: first record does not look like a TLS handshake

не работает

root@VPN-vps-server:/opt# ./dumbproxy -cert ./nginx-selfsigned.crt -key ./nginx-selfsigned.key -verbosity 10
MAIN : 2020/06/14 11:04:17 main.go:76: INFO Starting proxy server...
HTTPSRV : 2020/06/14 11:04:25 server.go:3059: http: TLS handshake error from 178.122.98.169:56928: remote error: tls: bad certificate
HTTPSRV : 2020/06/14 11:04:25 server.go:3059: http: TLS handshake error from 178.122.98.169:12025: remote error: tls: bad certificate
HTTPSRV : 2020/06/14 11:04:25 server.go:3059: http: TLS handshake error from 178.122.98.169:56930: remote error: tls: bad certificate
HTTPSRV : 2020/06/14 11:04:25 server.go:3059: http: TLS handshake error from 178.122.98.169:12027: remote error: tls: bad certificate
HTTPSRV : 2020/06/14 11:04:25 server.go:3059: http: TLS handshake error from 178.122.98.169:56932: remote error: tls: bad certificate
HTTPSRV : 2020/06/14 11:04:26 server.go:3059: http: TLS handshake error from 178.122.98.169:12029: remote error: tls: bad certificate
HTTPSRV : 2020/06/14 11:04:26 server.go:3059: http: TLS handshake error from 178.122.98.169:56934: remote error: tls: bad certificate

tls: bad certificate - это выходит тогда когда я пытаюсь через ФФ зайти куда нибудь, а в ФФ я вижу следующие - Did Not Connect: Potential Security Issue

Генерил серт и ключи вот так - openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout "$PWD"/nginx-selfsigned.key -out nginx-selfsigned.crt -subj "/C=$randC/ST=$randSt/L=$randSt/O=$randO/OU=$randOU/CN=$randCN.com"

Не могли бы помочь разобраться в чем проблема ? спасибо.

LetEncrypt certs

Hello!

I was try to use dumbproxy on my own server.

I used article from habr and runes dumbproxy from binary.

When dumbproxy started and I send request for checking:

curl -x 'https://USERNAME:PASSWORD@DOMAIN' http://ifconfig.co

I got error:

Sep 12 09:45:55 ip-xxx-xx-xx-xxx dumbproxy[13455]: HTTPSRV : 2022/09/12 09:45:55 server.go:3228: http: TLS handshake error from 79.139.170.228:2054: acme/autocert: unable to satisfy "https://acme-v02.api.letsencrypt.org/acme/authz-v3/152466746267" for domain "123.example.com": no viable challenge type found

ps: USERNAME/PASSWORD/domain and IP was hidden.

Whats wrong??

And one more question. Do you tried to use dumbproxy with Cloudflare proxy?

exec /dumbproxy: operation not permitted

Запустил контейнер командой:
docker run -d --security-opt no-new-privileges -p 8080:8080 --restart unless-stopped --name dumbproxy yarmak/dumbproxy

Контейнер висит в рестарте.
В логе ошибка:
exec /dumbproxy: operation not permitted

ОС: Ubuntu 22.04
Docker 20.10.17

Russia and other free freedom vpn

Hello @Snawoot thank you for alle thse amzing ans awesome softwares ! 💯 🥇

i find somme open source russian vpn to avoid censorship, but some ar in russian language so i wasn't able to use them, but others are in english language, so do you think they are reliable option even if these vpn seem to be intended only for russian people please ?

https://censortracker.org/

https://github.com/anticensority/runet-censorship-bypass

https://openrunet.org/index.html

https://github.com/roskomsvoboda

https://github.com/roskomsvoboda/censortracker

https://antizapret.prostovpn.org/

https://roskomsvoboda.org/

and these famous software

https://ultrasurf.us/

https://dongtaiwang.com/loc/phome_en.php

this is a new p2p browser, i don't know if this browser could replace vpn

https://censorship.no/en/index.html

i find free vpn intended for people who defend human rights in ************s, are these vpn are reliable please?

https://survpn.net/

https://calyx.net/

https://www.vpngate.net/en/download.aspx

https://riseup.net/en/vpn ( avoid this vpn because in reddit, some poeple says it requires donations to work)

https://leap.se/

other vpn tricks

https://www.your-freedom.net/index.php?id=home

https://github.com/trailofbits/algo

https://github.com/esptl/OpenVPNUI

https://github.com/NekoX-Dev/NekoX

Thank you very much !

TLS handshake error using "-autocert"

Trying to use https proxy with autocert gives me error:
server.go:3228: http: TLS handshake error from 219.67.76.63:54604: acme/autocert: missing server name
219.67.76.63 - is my local IP, not the server

nginx + dumbproxy

Is it possible to run nginx on 443 for TLS termination and pass a request to dumbproxy for real work?
TLS support is a great thing, but the port 443 is occupied by nginx, as usual (to serve multiple http services).

If yes, can you provide a somewhat working nginx config for nginx + dumbproxy pair. (is standard proxy_pass ok?)

P.S. The question suits better for StackOverflow, seems like. But I feel better to land it here.

Fail2ban rule

Hi! Tried to find any error proxy auth logs but only "POST" log messages appeared.
How to get wrong auth attempts?

Caddy + dumbproxy

Hi. I have one VPS and would like to use it to host projects over https and install dumbproxy HTTPS.
Since I can't run >1 container on port 443, is it possible to use a Caddy HTTPS server that will redirect HTTPS traffic to the dumbproxy-https container?
https://caddyserver.com/docs/running#docker-compose

I'm trying this configuration of Caddyfile:

proxy.mydomain.com {
    reverse_proxy dumbproxy-https:4434
}

Starting dumbproxy:

docker run -d \
    --security-opt no-new-privileges \
    -p 4434:443 \
    --restart unless-stopped \
    --name dumbproxy-https \
    yarmak/dumbproxy -bind-address :443 -auth 'static://?username=***&password=***'

Test command:

curl -v  -x 'https://user:[email protected]:443' ifconfig.co

I've tried different config combinations when running the dumbproxy container, but nothing works.
I either get an error like this:

curl: (35) LibreSSL/3.3.6: error:1404B42E:SSL routines:ST_CONNECT:tlsv1 alert protocol version

Or just an empty 200 OK response

Есть ли подробная инструкция для настройки клиент на mac OS?

Привет , столкнуолся с проблемой настройки на mac OS
Пробую через .pac файл указывать настройки прокси сервера, вот его содержимое
function FindProxyForURL(u, h) {
return "HTTPS exaple.com:443";
}
тот же конфиг работает в ОС windows и linux
что может быть не так?

Safari (iOS / MacOS) support

Hey folks,

I'm curious if Dumbproxy can work with Safari both on iOS and MacOS.

Recently I've tried to add my PAC string into proxy configuration of my WiFi network on iOS and Mac OS Sonoma, but Safari stopped serving any websites (connection error). At the same time everything works just fine with FireFox.

Is this a known issue? Are there any workarounds?

`acme/autocert: missing server name` HTTPSRV error

Hey there!

Trying to set up HTTPS proxy under VSCode proxy settings but constantly receive errors during TLS handshake.

dumbproxy log:

Apr 21 10:48:25 proxy-srv-1 dumbproxy[4349]: PROXY   : 2023/04/21 10:48:25 handler.go:131: INFO     Request: 77.33.111.33:62189 "" HTTP/1.1 CONNECT //github.com:443
Apr 21 10:48:25 proxy-srv-1 dumbproxy[4349]: PROXY   : 2023/04/21 10:48:25 handler.go:131: INFO     Request: 77.33.111.33:62189 "johndoe" HTTP/1.1 CONNECT //github.com:443
Apr 21 10:48:25 proxy-srv-1 dumbproxy[4349]: HTTPSRV : 2023/04/21 10:48:25 server.go:3228: http: TLS handshake error from 77.33.111.33:62192: acme/autocert: missing server name

VSCode client log:

[ERROR] [default] [2023-04-21T18:10:27.709Z] GitHub Copilot could not connect to server. Extension activation failed: "tunneling socket could not be established, cause=connect ECONNREFUSED 33.77.11.66:80"

/etc/default/dumbproxy:

dumbproxy -auth "basicfile://?path=/etc/dumbproxy.htpasswd" -autocert -bind-address :443

VSCode settings.json:

{
  "http.proxy": "https://johndoe:[email protected]"
  "http.proxyStrictSSL": false,
  "http.proxySupport": "on"
}

But there are no issues using cURL❗️:

❯ curl -x 'https://johndoe:[email protected]' https://copilot-proxy.githubusercontent.com/_ping
{"now":1682100802,"status":"ok"}
Apr 21 18:13:22 proxy-hel1-1 dumbproxy[7176]: PROXY   : 2023/04/21 18:13:22 handler.go:131: INFO     Request: 77.37.131.83:57276 "atkrv" HTTP/1.1 CONNECT //copilot-proxy.githubusercontent.com:443

I'm actually confused and can't get why I get cause=connect ECONNREFUSED 33.77.11.66:80 on port 80❗️and why there's no server name 😕

Would be grateful for any assistance 🙏

bug in the 'dumbproxy -passwd' command - it create multiple lines instead of replacing password of existing user

bug in the 'dumbproxy -passwd' command - it create multiple lines instead of replacing password of existing user

how to reproduce:

mkdir -p /etc/dumbproxy
dumbproxy -passwd /etc/dumbproxy/htpasswd user password
dumbproxy -passwd /etc/dumbproxy/htpasswd user password
dumbproxy -passwd /etc/dumbproxy/htpasswd user password

actual results:

# cat /etc/dumbproxy/htpasswd
user:$2a$04$G9r3OGk.JPAG7V3snC.ul.UMWyTRpDxo4oHikBrIUkqhP83scOQEC
user:$2a$04$9Egr6RG7CF4fUieHphLlceVILi6XjrOKVBwdL8j7G8lT0S9yfBZpe
user:$2a$04$DBceuFVPiukX9R8DJbalP.rjgMz/ISz/GLkSCmhB6dyhXcX356TbG

expected results:

# cat /etc/dumbproxy/htpasswd
user:$2a$04$DBceuFVPiukX9R8DJbalP.rjgMz/ISz/GLkSCmhB6dyhXcX356TbG

is it possible to fix this dumbproxy bug?

Extra logging foe cert:// auth scheme

I'm struggling with the setup to allow certificate-based authentication for the proxy. I've set up my own CA and generated a bunch of keys for my clients but both windows and osx ones seems to fail to authenticate with the given client cert. The server side logging is set to verbosity 10 but nothing is being logged. Is there any way to make the logging more verbose for cert-based auth and also an idea -- any way to log the username/client certificate CN for proxied requests?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.