jan icon indicating copy to clipboard operation
jan copied to clipboard

feat: HTTP proxy support

Open markmehere opened this issue 1 year ago • 2 comments

Describe Your Changes

This adds requested proxy support although not SOCKS nor PAC support.

If you can decipher those acronyms you may know more about proxies than me.

It includes all changes from #1558 and the two work well in combination as many proxies invalidate end-to-end security.

Self-signed/unverified certificate support is understandably disabled by default - although on a certificate error the user will be notified of the setting.

Proxies must begin with http at all-levels to work or be saved to preferences.

To test proxy support:

brew install mitmproxy
mitmproxy -p 9028 --set stream_large_bodies=1m    # stream_large_bodies very important
make dev
# set HTTPS proxy to http://127.0.0.1:9028
# enable Ignore SSL certificates
# download a model and observe

Feel free to merge and edit - as it's your project! 🙂

Screenshot

proxy-working

Fixes Issues

  • #1512
  • #1074
  • #1040
  • #1558

Self Checklist

  • [x] Added relevant comments, esp in complex areas
  • [x] Updated docs (for bug fixes / features)
  • ~Created issues for follow-up changes or refactoring needed~

markmehere avatar Jan 13 '24 00:01 markmehere

Wow thank you so much for this PR! We'll take a look latest Monday. 🙏 ❤️

freelerobot avatar Jan 13 '24 02:01 freelerobot

Overally looks good to me. Please put your comment @louis-jan

namchuai avatar Jan 17 '24 03:01 namchuai

Cheers all. Looks good. I had some build troubles - still trying to figure out why builds work on one machine and not the other. 😁

markmehere avatar Jan 19 '24 11:01 markmehere

tested and looking good via the testing on Jan v0.4.4-160 ✅ image

Van-QA avatar Jan 22 '24 06:01 Van-QA