Comments (6)
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.
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.
#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.
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.
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.
Changes merged into master, new version released. Thanks all for your help.
from moodle-search_elastic.
Related Issues (20)
- Add support for Elastic Cloud HOT 1
- Consider switching to elastic search PHP SDK
- The status check should only occur on the settings page itself HOT 3
- Improve the connection check
- Unit tests failing in Moodle 4.2 due to phpunit isolation MDL-77989
- search_elastic\guzzle_exception does not fully implement \GuzzleHttp\Psr7\Response HOT 3
- Add support for file content indexing using Elastic Cloud
- Results Order settings value changes when moving through pages of results
- Support 3.10
- Enabling "Wildcard at the start" breaks lucene requests HOT 1
- Migrate from travis to Github Actions
- Failing tests in Moodle 3.10+
- Fix mutiple assertRegExp is deprecated and will be removed in PHPUnit 10
- Fix ci alignment & cleanup for Reusable workflows (master)
- Fix ci alignment & cleanup for Reusable workflows (MOODLE_310_STABLE)
- Any plans on supporting Elasticsearch 8.x? HOT 5
- Modernise the way proxy connections work HOT 1
- Test support for 4.1 -> Some issues found HOT 3
- How to validate that Tika is working HOT 2
- PHP Fatal error runinseparate process
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-search_elastic.