BasicAuth still not working

Đang mở
#510 17 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c, linux
Lĩnh vực
backend, networking

Hướng nghiên cứu

Start by reviewing the BasicAuth configuration and request authentication handling in Tinyproxy, then reproduce the reported 407 response with the supplied configuration and curl command. The issue does not identify relevant source files or tests, so trace how the Authorization header is checked and look for existing BasicAuth tests. Done means valid credentials allow the proxy request while invalid credentials still receive 407.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Tinyproxy version

1.11.1

Issue

With version 1.11.1, the proxy works well without BasicAuth

after adding the config line

Port 8888
Listen 127.0.0.1
Timeout 600
Allow 0.0.0.0/0
BasicAuth user1 123456

It looks like the basic auth does not work. There was issue #246 stating the problem was resolved.

I configure http_proxy=http://user1:[email protected]:8888 and the proxy is broken.

then I send a command directly to the proxy as below:

curl -vvv -X CONNECT -u user1:123456  http://127.0.0.1:8888
*   Trying 127.0.0.1:8888...
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
* Server auth using Basic with user 'user1'
> CONNECT / HTTP/1.1
> Host: 127.0.0.1:8888
> Authorization: Basic dXNlcjE6MTIzNDU2
> User-Agent: curl/8.1.2
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 407 Proxy Authentication Required
< Server: tinyproxy/1.11.1
< Content-Type: text/html
* Authentication problem. Ignoring this.
< Proxy-Authenticate: Basic realm="Tinyproxy"
< Connection: close
<
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head><title>407 Proxy Authentication Required</title></head>
<body>
<h1>Proxy Authentication Required</h1>
<p>This proxy requires authentication.</p>
<hr />
<p><em>Generated by tinyproxy version 1.11.1.</em></p>
</body>
</html>
* Closing connection 0

Can someone kindly help is this a problem or my misusage?

Ngôn ngữ chính
C
Star
6.1k
Fork
768
Merge trung bình
15 ngày 3 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tinyproxy/tinyproxy

Tất cả issue của tinyproxy/tinyproxy

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.