This repository was archived by the owner on Jun 11, 2024. It is now read-only.
Adding bind address pre-check before starting the default proxy #276
Open
cviaggi-actiance wants to merge 1 commit intobrowserup:masterfrom
Open
Adding bind address pre-check before starting the default proxy #276cviaggi-actiance wants to merge 1 commit intobrowserup:masterfrom
cviaggi-actiance wants to merge 1 commit intobrowserup:masterfrom
Conversation
…r, this avoids resource leaking
Contributor
|
I like the idea of this, generally. We are switching to mitm-proxy implementation instead of littleproxy. This might still have value in that context, but I'm not clear on that yet and haven't looked closely. |
Author
|
We currently use BUP in our production environment to intercept and grab HAR files. The issue we were facing is that BUP proxy assumes the port is free and it can bind to it. As it turns out, the Operations Team (some well meaning SRE I’m sure) had installed some other service which was binding to a port in the middle of that range. Littleproxy, if it failed to bind to the port, it wouldn’t clean itself up, resulted in a memory leak, and would eventually crash the system. So as long as mitm-proxy either cleans itself up, or the port is checked as free first, that would ensure there is no memory leak.
Thanks,
//C
From: HereC <notifications@github.com>
Sent: Thursday, December 3, 2020 11:30 AM
To: browserup/browserup-proxy <browserup-proxy@noreply.github.com>
Cc: Chris Viaggi <Chris.Viaggi@smarsh.com>; Author <author@noreply.github.com>
Subject: Re: [browserup/browserup-proxy] Adding bind address pre-check before starting the default proxy (#276)
[CAUTION] This is an EXTERNAL email. Do not click links or open attachments unless you recognize the sender and know the content is safe.
I like the idea of this, generally. We are switching to mitm-proxy implementation instead of littleproxy. This might still have value in that context, but I'm not clear on that yet and haven't looked closely.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbrowserup%2Fbrowserup-proxy%2Fpull%2F276%23issuecomment-738244169&data=04%7C01%7C%7Cab07756dc6cd4f34552608d897c1e388%7C01bc53fb79ca4409b3eda1a5082bdd00%7C1%7C0%7C637426206307744879%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=O8k6ZqTbPEyBsbZOS93%2FBg7OB7ZPM5iopiD5sRbsOyQ%3D&reserved=0>, or unsubscribe<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJKSUAUCTINLA5PVQQWYYSTSS7RNFANCNFSM4N2WW3TA&data=04%7C01%7C%7Cab07756dc6cd4f34552608d897c1e388%7C01bc53fb79ca4409b3eda1a5082bdd00%7C1%7C0%7C637426206307754870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4mzuKyjOLMl6caUmGMxkIEaa%2BV7JVntpCIYNqw1X1Ms%3D&reserved=0>.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LittleProxy code has a bug whereby when you try to bootstrap the proxy against a port that is already in use, it will fail and not cleanup it's resources. If left to run, this can eventually cause the max file descriptors to be reached.
We can't change LittleProxy but we can check to make sure port isn't already in use. In some environments it is not practical to assume the min-max ports will be reserved and unused all the time.