Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] tinyproxy filtering http headers unexpectedly

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
wwdev16
n00b
n00b
Posts: 53
Joined: Wed Aug 29, 2018 9:42 pm

[SOLVED] tinyproxy filtering http headers unexpectedly

  • Quote

Post by wwdev16 » Fri Jun 11, 2021 12:32 am

tinyproxy appears to be filtering non-standard http headers even though I believe
it is configured to not do that. This causes problems with the new version of proton mail.

Not finding anything useful on https://github.com/tinyproxy/tinyproxy/issues or
in man tinyproxy or man tinyproxy.conf.

In /var/log/tinyproxy/tinyproxy.log I see:

Code: Select all

Not sending client headers to remote machine
All of thes commands return nothing:

Code: Select all

grep -v '#' /etc/tinproxy/tinyproxy.conf | grep -i Anon
grep -v '#' /etc/tinproxy/tinyproxy.conf | grep -i Via
grep -v '#' /etc/tinproxy/tinyproxy.conf | grep -i Host
grep -v '#' /etc/tinproxy/tinyproxy.conf | grep -i XTinyproxy
Is there some config directive needed for web clients to have non-standard headers sent?

$ qlist -ICv tinyproxy:

Code: Select all

acct-group/tinyproxy-0                                                                                          
acct-user/tinyproxy-0                                                                                           
net-proxy/tinyproxy-1.11.0_rc1
$ equery u tinyproxy:

Code: Select all

 * Found these USE flags for net-proxy/tinyproxy-1.11.0_rc1:
 U I
 - - debug             : Enable extra debug codepaths, like asserts and extra output. If you want to get
                         meaningful backtraces see
                         https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + filter-proxy      : Enable filtering of domains/URLS 
 - - reverse-proxy     : Enable reverse proxying 
 - - test              : Enable dependencies and/or preparations necessary to run tests (usually controlled by
                         FEATURES=test but can be toggled independently)
 - - transparent-proxy : Enable transparent proxying 
 - - upstream-proxy    : Enable upstream proxying 
 - - xtinyproxy-header : Include the X-Tinyproxy header
Last edited by wwdev16 on Sat Jun 12, 2021 4:47 am, edited 1 time in total.
Top
user
Apprentice
Apprentice
Posts: 245
Joined: Sun Feb 08, 2004 4:57 pm

  • Quote

Post by user » Fri Jun 11, 2021 8:08 am

A wonderful world of open source.

Code: Select all

# ebuild /var/db/repos/gentoo/net-proxy/tinyproxy/tinyproxy-1.11.0.ebuild prepare

# grep -r "Not sending client headers to remote machine" /tmp/portage/net-proxy/tinyproxy-1.11.0/work/tinyproxy-1.11.0/
/tmp/portage/net-proxy/tinyproxy-1.11.0/work/tinyproxy-1.11.0/src/reqs.c:                             "Not sending client headers to remote machine");

# grep -B8 "Not sending client headers to remote machine" /tmp/portage/net-proxy/tinyproxy-1.11.0/work/tinyproxy-1.11.0/src/reqs.c
        /*
         * Don't send headers if there's already an error, if the request was
         * a stats request, or if this was a CONNECT method (unless upstream
         * http proxy is in use.)
         */
        if (connptr->server_fd == -1 || connptr->show_stats
            || (connptr->connect_method && ! UPSTREAM_IS_HTTP(connptr))) {
                log_message (LOG_INFO,
                             "Not sending client headers to remote machine");

Ready to verify possible reasons?
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Fri Jun 11, 2021 9:43 pm

Is there some config directive needed for web clients to have non-standard headers sent?
It does allow you to control what headers will be passed to the server.
AFAIR anonymous mode strips all non-essential headers.

But.... if I were you, I'd start with starting tcpdump on the machine with your proxy. And trying to connect anywhere. Possibly over HTTP, so I could easily eavesdrop on that conversation, and perhaps see how it fails.
Top
wwdev16
n00b
n00b
Posts: 53
Joined: Wed Aug 29, 2018 9:42 pm

[SOLVED] tinyproxy filtering http headers unexpectedly

  • Quote

Post by wwdev16 » Sat Jun 12, 2021 4:45 am

I'm going to call it a bug. Using privoxy instead doesn't have the problem.

From what I know of the HTTP spec, the CONNECT method doesn't require
stripping http headers from the initial connection to the destination. So I
suspect tinyproxy's behavior as shown by user's code snippet isn't correct.

Thanks for the help.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic