Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream failback #208

Closed
lars18th opened this issue Nov 12, 2018 · 14 comments
Closed

Upstream failback #208

lars18th opened this issue Nov 12, 2018 · 14 comments

Comments

@lars18th
Copy link

Hi,

I'm asking because I don't see the answer.

I have two different upstream HTTP proxies. One uses an unlimited connection, the other uses a metered connection. So, I like to use the first one... except when it is unavaliable.

How I can configure tinyproxy to support this environment?

Thank you!

@rofl0r
Copy link
Contributor

rofl0r commented Nov 12, 2018

that's not part of the functionality of tinyproxy. i also don't think it makes sense to implement it inside tinyproxy, it would make more sense as a standalone tool like "fallback-portredir", but i don't know if that exists yet. it would be relatively easy to implement though.

@lars18th
Copy link
Author

that's not part of the functionality of tinyproxy

Ah! Ok, then.

it would be relatively easy to implement though.

That's what I think. In fact, I don't understand why tinyproxy doesn't have this functionality.

Thank you!

@rofl0r
Copy link
Contributor

rofl0r commented Nov 14, 2018

In fact, I don't understand why tinyproxy doesn't have this functionality.

... tinyproxy doesn't have this functionality.

... tinyproxy ...

... tiny ...

@lars18th
Copy link
Author

Hi @rofl0r ,

Sorry! I don't like to be rude.
However, tinyproxy has a lot of functionalities... and a simple "round-robin" over a list of upstream proxies doesn't seem to be a "huge" functionality. Think only on this: With current implementation, what does tinyproxy when some upstream proxy fails? And what would you expect it to do?

I hope someone will try to include some enhancement targeting this.
Regards.

@rofl0r
Copy link
Contributor

rofl0r commented Nov 14, 2018

Think only on this: With current implementation, what does tinyproxy when some upstream proxy fails? And what would you expect it to do?

it will fail, and that's exactly what i'd expect.

now, since you used the term "round-robin" this reminded me that proxychains-ng does have a round-robin mode. so you could theoretically use that to achieve your desired effect.

@rofl0r
Copy link
Contributor

rofl0r commented Nov 14, 2018

to be precise i mean proxychains4 tinyproxy --foo --bar instead of defining the upstreams in tinyproxy itself.

@lars18th
Copy link
Author

Hi,

Any other idea to provide some "redundancy" for the upstream proxy?

My objective is quite simple: Two different upstream proxies, master and slave. And use only slave when master fails. That's all!

Regards.

@rofl0r
Copy link
Contributor

rofl0r commented Dec 20, 2018

did you read my response above that you downvoted ?

now, since you used the term "round-robin" this reminded me that proxychains-ng does have a round-robin mode. so you could theoretically use that to achieve your desired effect.

you can use proxychains-ng with round-robin mode. that means you run proxychains4 tinyproxy -foo -bar instead of tinyproxy and put the proxy configuration into proxychains.conf instead of tinyproxy.conf.

@lars18th
Copy link
Author

did you read my response above that you downvoted ?

Sure! But I can't use "proxychains4" as it's a preloader and I can't use it in my environment. Futhermore, I use tinyproxy with HTTP authentication for the upstream proxy. So, I can't use another tunneller without HTTP authentication support.

@rofl0r
Copy link
Contributor

rofl0r commented Dec 20, 2018

proxychains-ng supports basic authentication. why exactly "can't" you use it in your environment ?

@lars18th
Copy link
Author

why exactly "can't" you use it in your environment ?

Because in my embedded system the preloading function is forbidden!

Futhermore, if I use tinyproxy to add client HTTP proxy authentication for a service that doesn't support it (but support HTTP proxies), why I need to add the proxychains-ng tool? In this case I will use my service with proxychains directly. But, as I commented I can't.

@rofl0r
Copy link
Contributor

rofl0r commented Dec 20, 2018

it would make more sense as a standalone tool like "fallback-portredir", but i don't know if that exists yet. it would be relatively easy to implement though.

https://github.com/rofl0r/rrredir

use that to redirect a local port to your proxies, and use the local ip:port as upstream proxy address in tinyproxy (or directly in the browser's proxy settings).

e.g. rrredir -p 8000 proxy1.com:3128 proxy2.com:8080

only disadvantage of this approach: both destination proxies require the same credentials.

@lars18th
Copy link
Author

it would make more sense as a standalone tool like "fallback-portredir", but i don't know if that exists yet. it would be relatively easy to implement though.

https://github.com/rofl0r/rrredir

use that to redirect a local port to your proxies, and use the local ip:port as upstream proxy address in tinyproxy (or directly in the browser's proxy settings).

e.g. rrredir -p 8000 proxy1.com:3128 proxy2.com:8080

only disadvantage of this approach: both destination proxies require the same credentials.

Thank you @rofl0r !
That's what I really need. 👍

@rofl0r
Copy link
Contributor

rofl0r commented Dec 27, 2018

great. let me know if there are any issues with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants