Skip to content

Conversation

@trasher
Copy link
Contributor

@trasher trasher commented Nov 21, 2025

PoC

Adds a configuration entry to choose elements that won't use the proxy:
image

Only "Agents" have been added for now, plugins can add their own.
Toolbox::getGuzzleClient() and Toolbox::doCallCurl() are compatible.

@trasher
Copy link
Contributor Author

trasher commented Nov 21, 2025

Note: in order to test, update must be forced or entry in glpi_configs table added by hand. Regular update does not work since there is no schema update.

@trasher trasher force-pushed the feature/proxy-exclusions branch 2 times, most recently from b061769 to b7b1d6d Compare November 21, 2025 13:28
@orthagh
Copy link
Contributor

orthagh commented Nov 24, 2025

In addition to agent, we may add to the select:

  • SMTP
  • RSSFeed
  • Telemetry
  • GLPINetwork

All of them currently use directly proxy settings or pass by the callCurl function

@trasher
Copy link
Contributor Author

trasher commented Nov 24, 2025

In addition to agent, we may add to the select:

* SMTP

* RSSFeed

* Telemetry

* GLPINetwork

All of them currently use directly proxy settings or pass by the callCurl function

Webhooks also can be affected. To me GLPI Network includes marketplace, call to network api, GLPI version check and telemetry (I see no reason proxy would be enabled for one of those services and not the others).

@trasher
Copy link
Contributor Author

trasher commented Nov 25, 2025

Sounds like "CAS" should also have been a client for exclusion, but it seems it just do not use proxy settings.

@cedric-anne
Copy link
Member

Sounds like "CAS" should also have been a client for exclusion, but it seems it just do not use proxy settings.

As far as I know, CAS requests are made on browser side.

@trasher
Copy link
Contributor Author

trasher commented Nov 25, 2025

Sounds like "CAS" should also have been a client for exclusion, but it seems it just do not use proxy settings.

As far as I know, CAS requests are made on browser side.

OK, did not know. Perfect then :)

@trasher trasher force-pushed the feature/proxy-exclusions branch from b7b1d6d to d1a76fe Compare November 25, 2025 08:10
@trasher
Copy link
Contributor Author

trasher commented Nov 25, 2025

I think I've added all possible cases now

@trasher
Copy link
Contributor Author

trasher commented Nov 26, 2025

Webhooks also can be affected

I've added webhooks; even if it probably would require a finer setup (well, agents also).

@trasher
Copy link
Contributor Author

trasher commented Nov 26, 2025

I cannot really add tests. I had in mind to check if proxy config is passed or not to Guzzle client, but the only way I see to do that is using the Client::getConfig(); which is deprecated.

@trasher trasher marked this pull request as ready for review November 26, 2025 08:49
@trasher
Copy link
Contributor Author

trasher commented Nov 26, 2025

Description added as helper:
image

@cconard96
Copy link
Contributor

I'm not sure this is as flexible as some people will need it to be if different resources of the same type are on different networks. It may require IP range exclusions instead.

@trasher
Copy link
Contributor Author

trasher commented Nov 26, 2025

The goal for the moment is just to fix some cases that already are present (this only concerns inventory Agents) - a full complete solution would require much more wxork.

@trasher trasher force-pushed the feature/proxy-exclusions branch from cf6f666 to cb00773 Compare November 26, 2025 13:17
Copy link
Contributor

@AdrienClairembault AdrienClairembault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for me, just some types (didn't test functionally tho) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants