botocore icon indicating copy to clipboard operation
botocore copied to clipboard

Support socks proxy

Open zhan9san opened this issue 2 years ago • 5 comments

Fix #2540 and #880 I got approval from the author of #2081 to continue.

Could you please review this PR and approve it?

Test code:

  1. Set environment proxy
export https_proxy=socks5://127.0.0.1:50010 http_proxy=socks5://127.0.0.1:50010
  1. Run test code
import botocore.session
c = botocore.session.get_session().create_client('s3')
print(c.list_buckets())

BTW, it works only if proxies are set in environment while it doesn't work if proxies are set in Specifying proxy servers as http proxy doesn't work in configuration either.

zhan9san avatar Oct 25 '21 11:10 zhan9san

Hi @stobrien89 Could you kindly review this PR?

zhan9san avatar Nov 14 '21 06:11 zhan9san

Hi @zhan9san,

Thanks for your patience. This will likely require a review by a few team members— I'll try to get some additional eyes on this.

stobrien89 avatar Dec 15 '21 23:12 stobrien89

@stobrien89 any idea when those are coming? Maintaining private fork is painful.

fingon avatar Feb 22 '22 06:02 fingon

Thanks for your patience. This will likely require a review by a few team members— I'll try to get some additional eyes on this.

This patch has been forward ported a few times now. It includes a test case. At @aiven we have been running this in production for a very long time. It would be nice if we could stop manually patching botocore :)

paulwouters avatar Mar 07 '22 15:03 paulwouters

This is a crucial feature for us. Many of our EKS endpoints are private, requiring an SSH/SOCKS jump-server hop to access. Kubectl supports SOCKS proxies but botocore doesn't, so AWS EKS auth always fails rendering the clusters inaccessible locally.

adelsz avatar Oct 04 '22 15:10 adelsz

nth-ing this for the same reason as adelsz: SSH jump servers via SSM work well with most of the other tools we use but anything boto-based requires periodically rebasing this patch.

acdha avatar Nov 18 '22 21:11 acdha

@stobrien89 I guess I can ask about reviews again - it has been year.

fingon avatar Nov 19 '22 06:11 fingon

@stobrien89 it would be great if this could be reviewed.

facetoe avatar Jun 05 '23 23:06 facetoe

@facetoe, @fingon,

Apologies for the delay. I don't work with the botocore maintainers anymore. @kdaily, @tim-finnigan, or @dlm6693 can probably help you get this looked at.

stobrien89 avatar Jun 08 '23 18:06 stobrien89

@zhan9san are you still working on this?

@kdaily, @tim-finnigan or @dlm6693 what needs to be done to get this reviewed

RommelLayco avatar Aug 04 '23 03:08 RommelLayco

@RommelLayco

If the maintainers have time to review it, I am glad to resolve the confilicts.

I was a bit disappointed honestly.

zhan9san avatar Aug 04 '23 06:08 zhan9san

Pinging @kdaily, @tim-finnigan, or @dlm6693 one more time. If this fails to get traction again, I will give up on upstream and initiate work to patch this into fedora. But that would mean everyone else loses a chance to have this commonly requested feature in botocore :( But we have waited for almost two years now to get this merged in.

paulwouters avatar Aug 04 '23 13:08 paulwouters

Hi all, thanks for your patience here and thanks @zhan9san for creating this PR. The team is still tracking this feature request in the corresponding issue (https://github.com/boto/botocore/issues/2540). Although folks have mentioned that this patch is working fine, the team wants to do a more comprehensive review before taking on a new dependency. Especially considering that PySocks has not been updated since 2019. We have a backlog item for further investigation but at this time cannot provide any guarantees on if or when this would be supported.

tim-finnigan avatar Aug 04 '23 18:08 tim-finnigan

Is there anything i can do to help speed up the review? Note that we could always add pysocks as an extra dependencies to the pyproject.toml. that way they are only installed when explicitly asked for

RommelLayco avatar Aug 07 '23 22:08 RommelLayco

tested fine, nice job , when can we merge it ?

korenlev avatar Jan 13 '24 22:01 korenlev

Thanks again for your patience here. We brought this PR up with the team again for further review and discussion, and decided to close it as not under consideration at this time. We will keep https://github.com/boto/botocore/issues/2540 open to continue gathering community input and may revisit this PR at a later date. As mentioned earlier, adding a dependency that has not updates since 2019 is still a concern.

tim-finnigan avatar Mar 06 '24 23:03 tim-finnigan