3x-ui/web
BlacKSnowDot0 938417943d
Update inbound.go
checkPortExist Function:
Simplified the query by combining the conditions into a single Where clause.
Removed unnecessary variable assignment for db.

checkEmailExistForInbound Function:
Introduced a map seenEmails to track already seen emails, which eliminates the need for the contains function call for each client email, thus reducing the complexity from O(n^2) to O(n).

UpdateInbound Function:
Instead of manually assigning each field, a map updates is used to update only the changed fields in the database. This reduces the verbosity of the code and makes it easier to maintain.
Removed the unnecessary API calls for adding and deleting inbounds, as the function should only update the database record.

addClientTraffic Function:
Streamlined the update process by directly updating the traffic records in the database using a loop, which avoids the need to first load all records into a slice and then adjust them.
2023-11-19 17:50:41 -08:00
..
assets Update common.js 2023-11-19 17:28:56 -08:00
controller move restart cron to web.go 2023-09-06 18:22:37 +03:30
entity Add encrypt subscription ON/OFF switch 2023-08-26 16:54:01 +03:30
global add an option for webDomain 2023-05-31 01:21:14 +04:30
html undo ads geosite 2023-10-25 23:02:26 +03:30
job check fail2ban installed or not 2023-09-01 13:23:50 +03:30
locale fix default language in initLocalizer 2023-06-16 13:01:34 +03:30
middleware create and move middlewares to seperate folder 2023-05-31 01:13:46 +04:30
network Update auto_https_conn.go 2023-11-19 17:39:00 -08:00
service Update inbound.go 2023-11-19 17:50:41 -08:00
session change gin-contrib to Calidity 2023-06-25 01:10:41 +03:30
translation Fix translation Spanish (#1147) 2023-10-20 08:40:27 +03:30
web.go move restart cron to web.go 2023-09-06 18:22:37 +03:30