[PR #5101] [MERGED] fix: route WARP API requests through panel proxy #5782

Closed
opened 2026-11-02 04:04:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5101
Author: @rqzbeh
Created: 6/8/2026
Status: ✅ Merged
Merged: 6/8/2026
Merged by: @MHSanaei

Base: main ← Head: fix-warp-proxy-issue-5096


📝 Commits (1)

  • c2a3608 fix: route WARP API requests through panel proxy

📊 Changes

1 file changed (+6 additions, -7 deletions)

View changed files

📝 web/service/warp.go (+6 -7)

📄 Description

Issue

Fixes https://github.com/MHSanaei/3x-ui/issues/5096

On servers located in regions with internet restrictions (such as Iran), direct access to the Cloudflare API can fail. This results in errors when trying to generate and create a WARP outbound because the required data cannot be fetched.

Solution

This PR modifies the WARP integration (web/service/warp.go) to use the internal panel proxy for Cloudflare API requests instead of a direct connection.

I replaced the static warpHTTPClient with s.NewProxiedHTTPClient(15 * time.Second). NewProxiedHTTPClient transparently routes the request through the configured Telegram/panel proxy (if available) or falls back to a direct connection, successfully bypassing internet restrictions for WARP generation.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5101 **Author:** [@rqzbeh](https://github.com/rqzbeh) **Created:** 6/8/2026 **Status:** ✅ Merged **Merged:** 6/8/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix-warp-proxy-issue-5096` --- ### 📝 Commits (1) - [`c2a3608`](https://github.com/MHSanaei/3x-ui/commit/c2a3608889ef4155878bcfa3a66eaba00c7cd1dd) fix: route WARP API requests through panel proxy ### 📊 Changes **1 file changed** (+6 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `web/service/warp.go` (+6 -7) </details> ### 📄 Description ### Issue Fixes https://github.com/MHSanaei/3x-ui/issues/5096 On servers located in regions with internet restrictions (such as Iran), direct access to the Cloudflare API can fail. This results in errors when trying to generate and create a WARP outbound because the required data cannot be fetched. ### Solution This PR modifies the WARP integration (`web/service/warp.go`) to use the internal panel proxy for Cloudflare API requests instead of a direct connection. I replaced the static `warpHTTPClient` with `s.NewProxiedHTTPClient(15 * time.Second)`. `NewProxiedHTTPClient` transparently routes the request through the configured Telegram/panel proxy (if available) or falls back to a direct connection, successfully bypassing internet restrictions for WARP generation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:02 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5782
No description provided.