mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-24 14:55:02 +03:00
fix(hosts): carry an inbound update's externalProxy change onto its imported hosts (#6831)
Subscriptions build an inbound's links from its Host rows, and those rows are imported from streamSettings.externalProxy only when the inbound is added. An update that moved the external proxy returned 200, but every subscription kept handing out the old address, port and security. An update now re-syncs only the externalProxy entries it changed onto hosts that are still exactly as imported. Unchanged entries are set aside first, so a host the admin edited, disabled, deleted or shared is never re-imported next to the admin's version, and a stream without the externalProxy key leaves hosts alone.
This commit is contained in:
@@ -2047,6 +2047,9 @@ func (s *InboundService) UpdateInbound(inbound *model.Inbound) (*model.Inbound,
|
||||
if err := s.updateClientTraffics(tx, oldInbound, inbound); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := database.SyncHostsFromExternalProxy(tx, inbound.Id, running.StreamSettings, inbound.StreamSettings); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Ensure created_at and updated_at exist in inbound.Settings clients
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user