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

Add support for proxy #17

Closed
kowoba opened this issue Aug 11, 2024 · 6 comments
Closed

Add support for proxy #17

kowoba opened this issue Aug 11, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@kowoba
Copy link

kowoba commented Aug 11, 2024

Just a suggestion... add support for proxy server, either using global evironment ${https_proxy} (ENV:https_proxy) or through config setting (or both, setting overriding env var?). I'm currently doing a work-around by pointing my Amiga systems to a dedicated openai-proxy instance (with socat listening on 443) using an entry for api.openai.com in the hosts file, but it's a bit cumbersome, would be easier to just use the normal web proxy.

Cheers!

Copy link

Welcome! Thanks for submitting your first AmigaGPT issue! Your issue will be looked at ASAP. <3

@sacredbanana
Copy link
Owner

Sure. I think adding proxy servers to a connection in AmiSSL is pretty straightforward so I'll do this for you.

I'm curious though, why are you even using a proxy server for your Amiga traffic?

@sacredbanana sacredbanana self-assigned this Aug 11, 2024
@sacredbanana sacredbanana added the enhancement New feature or request label Aug 11, 2024
@kowoba
Copy link
Author

kowoba commented Aug 11, 2024

Well, mostly because my Amiga systems are legacy IPv4-only and kinda "air-locked" on my otherwise IPv6-only home network with native IPv6 uplink :)

Btw - you may want to have a look at the "AmiGeminiProxy" in the AmiGemini archive (in the sources), it can do "unsecure" https proxying or "ssl offloading" or what to call it, so even 68000 systems for which there is no AmiSSL can still reach https on remote sites. Despite its name, it doesn't just do the Gemini protocol, it also does http, https and many more.

Cheers, and thanks for swift response!

@sacredbanana
Copy link
Owner

haha I'll stick with IPv4 for my home network

@sacredbanana sacredbanana closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2024
@sacredbanana
Copy link
Owner

@kowoba as a Christmas present I have added proxy support for you in 2.1.0. It supports both HTTP and HTTPS proxy servers and also supports proxy servers that require basic authentication. Tested it with mitmproxy running on my MacBook. Bear in mind it won't work with AmiGeminiProxy because that proxy server doesn't support the types of request I need to make to OpenAI. It doesn't allow POST requests for example. AmiGeminiProxy could be edited to support these which is something you could do if you want to use that proxy server for some reason.

Let me know how it goes

@sacredbanana
Copy link
Owner

Feel free to reopen the issue if you have any feedback or questions

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

No branches or pull requests

2 participants