[GH-ISSUE #4913] [Feature]: node enhancement #3437

Closed
opened 2026-10-31 20:32:25 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @mshahr1 on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4913

No

Describe the solution you'd like

After installing and using Sanaei Panel version 3.2.7, many of the bugs from previous versions have been resolved. The panel has improved significantly, and I can confidently say this is the best version yet.

I have two suggestions for you that I think would be very useful:

Adding an option to enable a SOCKS proxy for specific nodes: The reason for this suggestion is that, due to the current network conditions in Iran, nodes located outside the country are not easily accessible. Having an option to route API requests through a proxy would be a massive help.

Allowing user updates when nodes are offline: Currently, when editing a user from the main panel (which manages the other nodes), if even one node is offline, the modification fails. Given the frequent internet disruptions in Iran, it would be extremely practical if we could still successfully save and update the user's data regardless of a node's offline status.

Thank you again for all your hard work!

Alternatives you've considered

No response

Concrete use case

Nodes

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @mshahr1 on GitHub (Jun 4, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4913 ### Is your feature request related to a problem? No ### Describe the solution you'd like After installing and using Sanaei Panel version 3.2.7, many of the bugs from previous versions have been resolved. The panel has improved significantly, and I can confidently say this is the best version yet. I have two suggestions for you that I think would be very useful: Adding an option to enable a SOCKS proxy for specific nodes: The reason for this suggestion is that, due to the current network conditions in Iran, nodes located outside the country are not easily accessible. Having an option to route API requests through a proxy would be a massive help. Allowing user updates when nodes are offline: Currently, when editing a user from the main panel (which manages the other nodes), if even one node is offline, the modification fails. Given the frequent internet disruptions in Iran, it would be extremely practical if we could still successfully save and update the user's data regardless of a node's offline status. Thank you again for all your hard work! ### Alternatives you've considered _No response_ ### Concrete use case Nodes ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [x] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
bsakaguchi 2026-10-31 20:32:25 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 4, 2026):

Thanks for the detailed suggestions and for testing v3.2.7!

I've checked the source to understand where these would need to land:


1. Per-node SOCKS/HTTP proxy for API connections

Currently not implemented. The Node struct (database/model/model.go) has no proxy field, and both HTTP clients that dial out to nodes (nodeHTTPClient in web/service/node.go and remoteHTTPClient in web/runtime/remote.go) use a fixed transport with no proxy support.

What would be needed:

  • A new field on the Node model (e.g. ProxyURL — a full URL like socks5://user:pass@host:port) with a DB migration.
  • nodeHTTPClientFor() in web/service/node.go and the transport construction in web/runtime/remote.go would need to pick up that field and pass it to http.ProxyURL() on the transport.
  • UI: a new optional input in the node add/edit form.

This is a self-contained, well-scoped change that would be a great first PR if you'd like to help implement it.


2. Save client updates even when a node is offline

This is confirmed in the code. In web/service/client.go (UpdateInboundClient, around line 3538), when the remote runtime for a node inbound cannot be reached, the error bubbles straight back to the API call and the whole DB transaction is rolled back — so nothing is saved. The same all-or-nothing behaviour exists at the inbound level in web/service/inbound.go (UpdateInbound, around line 895).

What would be needed:

  • A "best-effort" mode: save the canonical data to the local DB regardless of whether the live Xray sync succeeds, and log/surface per-node sync failures as warnings rather than fatal errors.
  • This is safe because nodes already sync their full client list from the central panel at startup (heartbeat reconnection), so a node that comes back online will pick up the correct state automatically.

This would be a larger change touching both the service layer and the API response shape (to distinguish "saved OK, some nodes unreachable" from a true failure), but it would make the panel significantly more resilient under the network conditions you described.


Both are genuine gaps worth tracking. If you or another contributor wants to open a PR for either, the key files are:

  • database/model/model.go — Node struct
  • web/service/node.go — probe / node HTTP client
  • web/runtime/remote.go — remote API client
  • web/service/client.go — UpdateInboundClient / Update
  • web/service/inbound.go — UpdateInbound
<!-- gh-comment-id:4623480066 --> @github-actions[bot] commented on GitHub (Jun 4, 2026): Thanks for the detailed suggestions and for testing v3.2.7\! I've checked the source to understand where these would need to land: --- **1. Per-node SOCKS/HTTP proxy for API connections** Currently not implemented. The `Node` struct (`database/model/model.go`) has no proxy field, and both HTTP clients that dial out to nodes (`nodeHTTPClient` in `web/service/node.go` and `remoteHTTPClient` in `web/runtime/remote.go`) use a fixed transport with no proxy support. What would be needed: - A new field on the `Node` model (e.g. `ProxyURL` — a full URL like `socks5://user:pass@host:port`) with a DB migration. - `nodeHTTPClientFor()` in `web/service/node.go` and the transport construction in `web/runtime/remote.go` would need to pick up that field and pass it to `http.ProxyURL()` on the transport. - UI: a new optional input in the node add/edit form. This is a self-contained, well-scoped change that would be a great first PR if you'd like to help implement it. --- **2. Save client updates even when a node is offline** This is confirmed in the code. In `web/service/client.go` (`UpdateInboundClient`, around line 3538), when the remote runtime for a node inbound cannot be reached, the error bubbles straight back to the API call and the whole DB transaction is rolled back — so nothing is saved. The same all-or-nothing behaviour exists at the inbound level in `web/service/inbound.go` (`UpdateInbound`, around line 895). What would be needed: - A "best-effort" mode: save the canonical data to the local DB regardless of whether the live Xray sync succeeds, and log/surface per-node sync failures as warnings rather than fatal errors. - This is safe because nodes already sync their full client list from the central panel at startup (heartbeat reconnection), so a node that comes back online will pick up the correct state automatically. This would be a larger change touching both the service layer and the API response shape (to distinguish "saved OK, some nodes unreachable" from a true failure), but it would make the panel significantly more resilient under the network conditions you described. --- Both are genuine gaps worth tracking. If you or another contributor wants to open a PR for either, the key files are: - `database/model/model.go` — Node struct - `web/service/node.go` — probe / node HTTP client - `web/runtime/remote.go` — remote API client - `web/service/client.go` — `UpdateInboundClient` / `Update` - `web/service/inbound.go` — `UpdateInbound`
Author
Owner

@MHSanaei commented on GitHub (Jun 12, 2026):

Thanks for the kind words! This issue bundles several loose suggestions, which makes it hard to track or act on as one item. Closing this umbrella — please open a separate issue per concrete suggestion (one feature, what it should do, where in the UI) so each can be triaged on its own merits.

<!-- gh-comment-id:4688400098 --> @MHSanaei commented on GitHub (Jun 12, 2026): Thanks for the kind words! This issue bundles several loose suggestions, which makes it hard to track or act on as one item. Closing this umbrella — please open a separate issue per concrete suggestion (one feature, what it should do, where in the UI) so each can be triaged on its own merits.
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#3437
No description provided.