Kartotherian (as part of geoshape service) connects to WDQS through a web proxy and via query.wikidata.org. Since this is functionally internal traffic, it should go to wdqs.discovery.wmnet instead, and not use a proxy at all. We still want Kartotherian to use the "public" wdqs cluster, since it allows arbitrary queries directly from user. See T200594, T195438 and T195559 for more context.
It seems that configuring the wdqs endpoint is already possible, but undocumented. It is not clear to me if bypassing web proxy is configurable or not.