Commit graph

418 commits

Author SHA1 Message Date
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
BlacKSnowDot0
b3f36d7239
Update auto_https_conn.go
- In readRequest, removed redundant assignment of c.firstBuf after the Read operation. The slice is already limited to n bytes read.
- Changed resp from a value to a pointer in readRequest to avoid copying the struct when only a pointer is needed.
- Added error handling in the Read method to return an error if readRequest fails, which was previously ignored.
- Optimized the condition in Read to check for equality (c.bufStart == len(c.firstBuf)) instead of greater than or equal, as bufStart should never exceed len(c.firstBuf).
2023-11-19 17:39:00 -08:00
BlacKSnowDot0
0b9847e825
Update common.js 2023-11-19 17:28:56 -08:00
MHSanaei
cad6eeb9f5 fixed telego
after  github.com/mymmrac/telego from 0.26.3 to 0.27.0
2023-10-25 23:03:17 +03:30
MHSanaei
ff55ddd036 undo ads geosite 2023-10-25 23:02:26 +03:30
emirjorge
f537701b4a
Fix translation Spanish (#1147)
* Corrected Tittle Spanish :D

* Fix languague Spanish
2023-10-20 08:40:27 +03:30
emirjorge
9f3efff88c
Corrected Tittle Spanish :D (#1136) 2023-10-18 13:30:37 +03:30
MHSanaei
b0aaece6eb remove iran.dat
so after this you need to click on "reset to default configuration"
2023-10-18 13:22:07 +03:30
MMR
c0ef791f01
increase accuracy of geoip and geosite (#1047)
* increase accuracy of geoip and geosite

* Update x-ui.sh

* Update release.yml

* Update settings.html

* Update release.yml

* Update DockerInit.sh

* Update settings.html

* Update settings.html

* Update x-ui.sh
2023-10-18 12:25:16 +03:30
emirjorge
b63612ab98 Add Translation to Spanish (#1135)
Add Translation to Spanish +
2023-10-18 12:12:50 +03:30
MHSanaei
2a354819c7 fix Russian translation 2023-10-09 22:23:36 +03:30
Dmitry Nefedov
0b96622b4c
Fix Russian translation (#1093) 2023-10-01 10:46:29 +03:30
Jiraiya8
86cfa14408
fix chinese translation (#1055)
Co-authored-by: qingbo <qingbo@jingling.group>
2023-09-14 12:45:21 +03:30
MMR
57cc9954af
include .ایران TLD for IR domains (#1037) 2023-09-12 10:40:25 +03:30
MHSanaei
be4a68bd8b move restart cron to web.go
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-09-06 18:22:37 +03:30
MHSanaei
6765babe7b check fail2ban installed or not 2023-09-01 13:23:50 +03:30
MHSanaei
4b4be5f837 v1.7.8 2023-08-30 00:39:18 +03:30
MHSanaei
6aeedac051 optimized finding client index
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-29 22:30:52 +03:30
MHSanaei
ba673778ea fixed - Transparent Proxy button 2023-08-29 22:14:59 +03:30
MHSanaei
149bd0ec51 v1.7.7 2023-08-26 22:24:56 +03:30
MHSanaei
18617afd43 add tls ocspStapling
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 18:52:38 +03:30
MHSanaei
731e83a7da Clean legacy vmess
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 16:58:55 +03:30
MHSanaei
1c1f53267a Add encrypt subscription ON/OFF switch
Co-Authored-By: SudoSpace <79229394+sudospaes@users.noreply.github.com>
2023-08-26 16:54:01 +03:30
MHSanaei
8489f5f528 some changes
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 16:07:02 +03:30
MHSanaei
872974910c Show ALPN order
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 15:45:53 +03:30
MHSanaei
147999dd88 [sub] support client-side group name
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 15:41:52 +03:30
MHSanaei
fe22cbd0e5 Transparent Proxy with sockopt Stream Setting
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 15:39:18 +03:30
MHSanaei
1277285d08 [db] Enbancement add traffic fully transactional
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 15:19:51 +03:30
MHSanaei
75df8a05f1 [ss] add ietf methods
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 15:12:32 +03:30
MHSanaei
38e1d0f94e [sub] improve usage info in Remark
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-26 15:11:12 +03:30
Hamidreza
4a6bd23873
daily clear logs #952 2023-08-24 17:14:51 +03:30
quydang
d2c75b94cf Added Vietnamese Language (#939) 2023-08-21 11:32:01 +03:30
MHSanaei
edfc2d8d93 fix switch enable function for clients
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-17 15:26:32 +03:30
MHSanaei
ae7283fc73 fix finding client issue #884
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-12 17:18:24 +03:30
MHSanaei
ed53df5ef3 multi user HTTP & Socks inbounds
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-09 01:43:58 +03:30
MHSanaei
b541290ded [front] better info modal
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-09 01:03:52 +03:30
MHSanaei
792fe6d9ef [front] better info modal
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-09 00:58:53 +03:30
MHSanaei
e00c3f1823 add panel usage to main page 2023-08-09 00:37:05 +03:30
Hamidreza
24eb36715a
Add iran.dat when updating xray (#870)
we can download iran.dat, because it's one of the required files in our settings
2023-08-08 22:21:02 +03:30
MHSanaei
d424b4bc32 [ss] fix 2022 links #878
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-08-08 21:58:41 +03:30
MHSanaei
329889ec00 v1.7.5 2023-08-02 17:19:50 +03:30
somebodywashere
dd0217b46b
IP Limit Tweaks to reduce false bans (#850)
* IP Limit Tweaks to reduce false bans
1) Check IPs every 10s instead of 20s
2) F2B jail: maxretry 3 -> 4, findtime 100 -> 60

* USERS SHOULD UPDATE BANTIME ONCE AFTER UPDATE
to recreate jail for Ip Limit
2023-08-02 00:28:16 +03:30
MHSanaei
bf971911d5 log level & syslog
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-07-31 20:11:47 +03:30
MHSanaei
c46ced0c4c fix logs in api
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-07-31 19:52:28 +03:30
MHSanaei
dd3bbbc4af [SS] fix bulk creation
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-07-31 19:49:27 +03:30
MHSanaei
6066edd510 sockopt acceptProxyProtocol for h2 , gRPC #773 2023-07-29 15:52:02 +03:30
MHSanaei
eaec9e54ad random password button for kcp , quic 2023-07-28 18:27:04 +03:30
MHSanaei
145ea1e6f1 full multiuser shadowsocks
full multiuser shadowsocks +
fix logs after api changes

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-07-27 11:58:46 +03:30
MHSanaei
c2b1fb4855 because of #815 now we can use XTLS/Xray-core
change MHSanaei/Xray-core to XTLS/Xray-core
2023-07-27 11:06:27 +03:30
somebodywashere
09807b39aa
No reason to write to BlockedIPs (#815) 2023-07-26 20:03:28 +03:30