Coder Social home page Coder Social logo

Comments (6)

mattporritt avatar mattporritt commented on June 8, 2024

Thanks Brendan,
I see the need for this now. As you've suggested I'll get it to apply/respect the Moodle proxy settings. I think this is a better way than adding plugin specific proxy settings. DRY FTW

from moodle-search_elastic.

mattporritt avatar mattporritt commented on June 8, 2024

OK, I've created a branch for this called proxy. Which is very much a work in progress.
The Guzzle docs are easy to follow, and it was pretty easy just to hack in a static proxy on the get request method to test. However, I'm having issues resolving the Guzzle implementation with the Moodle implementation.
I don't have a setup available that actually uses Moodle's proxy settings. One of the things I'd like to know is in the moodle admin setings, what actually goes in the setting 'Proxy host' is it a domain like localhost or an actual URI like http://localhost.
I'd also like to know how (if at all) Moodle deals with HTTPS proxies, the Moodle docs here aren't helpful and I haven't been able to figure it out from the code.
I'll keep digging

from moodle-search_elastic.

 avatar commented on June 8, 2024

#10 Created pull request for basic HTTP proxy support. Confirmed functionality on our environment. This could be further extended to support username/password and perhaps proxy type.
AFAIK, only proxy machine hostname (or IP address) goes into $CFG->proxyhost field, without protocol definition.

from moodle-search_elastic.

mattporritt avatar mattporritt commented on June 8, 2024

This should be pretty much done now.
I've updated the code to respect all of Moodle's HTTP proxy settings, including auth and bypass. There is unit test coverage of the functionality. I've also verified it's working using Squid as the proxy on my test rig.
The only thing left to do is test it on a real setup, which I don't have at hand. @martindCatalyst are you able to pull the latest from the proxy branch and test it?
If every thing checks out, I'll bump the version and merge it into master.

from moodle-search_elastic.

 avatar commented on June 8, 2024

Hello @mattporritt
On our environment with web servers not having access to elasticsearch instance, and using squid3 as HTTP proxy I can confirm this is working as expected.

All green from me.

Thank you for your work

from moodle-search_elastic.

mattporritt avatar mattporritt commented on June 8, 2024

Changes merged into master, new version released. Thanks all for your help.

from moodle-search_elastic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.