31 Commits

Author SHA1 Message Date
_rave_cat_
9261a6063d
chore: fix typos. (#640)
* chore: fix typos.

* chore: makes go-staticcheck happy.
2024-06-09 15:21:27 +08:00
Senis
115d7bad6f
Replace standard log package with logrus
The standard "log" package was replaced by the structured logger "github.com/sirupsen/logrus" for better log control in various files. This change will allow to tailor the logging information more precisely and make logs easier to read and analyze. All calls of standard log methods were replaced by their logrus counterparts.
2023-12-28 13:40:31 +08:00
Senis
76076b2d6a Refactor variable assignments in sspanel.go
Simplified the variable assignment logic in sspanel.go to increase code efficiency and readability. "tlsType" is now conditionally initialized once instead of reset multiple times, and it is also properly scoped. Removed an unnecessary check for "nodeConfig.Security" in the "Trojan" case as this value is already taken into account in the efficient, updated logic.
2023-11-08 19:26:38 +08:00
Senis John
d9971b2181
Initialize server port in sspanel
This commit initializes the server port in sspanel.go if the userListResponse is not empty. This adds a level of preventative measure to ensure port is not left uninitialized.
2023-10-28 13:19:17 +08:00
Senis John
287c30e7d0
Update application dependencies and improve error logging
This commit updates the version of many dependencies in go.sum and go.mod. It improves error handling in sspanel.go by including both the HTTP response body and error in the logged message. It also updates the xray-core version.
2023-10-18 20:58:39 +08:00
Senis John
73bc37cb51
Add EnableREALITY field and update REALITYConfig parsing
Enabled the REALITY feature on both model.go and sspanel.go for the api and service assemblies and updated the inboundbuilder to switch the REALITY feature based on the new field and condition statements. This enhancement allows finer control and visibility of the REALITY feature's activation.

In addition, the REALITYConfig in config.go was updated to remove the DisableLocal field and add the DisableLocalREALITYConfig field. The main/config.yml.example file has also been updated to reflect these changes and provide users with a clearer understanding of the config setup.
2023-10-04 23:08:59 +08:00
M1Screw
78f2f88296
feat: update sspanel model (#467) 2023-10-04 20:28:03 +08:00
Senis John
42a2226769
Enhanced ssPanel API by adding panel version check and improving custom config parsing
Added a function to compare the ssPanel version with the baseline version and inform users if their panel version is outdated. Made changes to improve readability and clarity in variable naming and error handling. The handling of the custom config feature has also been significantly optimized, providing more efficient use and easier debugging of parsing issues. The overall changes lead to better compatibility with different ssPanel versions and a more user-friendly custom config feature.
2023-10-04 16:50:52 +08:00
M1Screw
71aba0601e
feat: unify trojan transport & add ss2022 related config (#465) 2023-10-04 10:44:45 +08:00
Senis John
5fe18e020d
Refactor sspanel and test files in the API
Fixed typos, changed variable naming to follow camel case convention, simplified the error handling, and refactored the function names in sspanel.go for improved readability and consistency. Accordingly, updated the test function names in sspanel_test.go to match the changes made in the main file. Additionally, the if condition in ParseSSPanelNodeInfo was streamlined to improve the function's readability and error handling. The changes will help in better understanding the code while debugging or adding new features.
2023-10-04 09:45:52 +08:00
OPPO9008
5d5470a919
修复http伪装配置解析 (#389)
根据sspanel代码,headerType 才是下发订阅的参数
2023-06-21 07:14:20 +08:00
Senis John
42da6c155d
fix: unexceptional etags handle 2023-06-11 20:07:43 +08:00
OPPO9008
a70a0d9a31
初步适配sspanel ETag 功能 (#309)
在最新sspanel 版本 M1Screw 应该找到正确下发Etag的办法了,如果你是旧版本,可以尝试
修改
res.Header().Get("ETag")
为
res.Header().Get("webapi-etag")

Co-authored-by: admin <admin@justcn2.top>
2023-06-01 18:09:08 +08:00
Senis John
4f13aac094
fix: sspanel custom flow config doesn't work 2023-05-25 21:08:56 +08:00
Senis John
4ab196ad29
fix: local vless flow config doesn't work 2023-05-25 20:39:46 +08:00
Senis John
b49798ab16
fix: sspanel version >= 2023.2 will discard node status report.
fix: return error message for null user list
2023-05-18 01:23:46 +08:00
thank243
169f742b76
Update core to 1.8.1 and support Reality proto (#326)
* update: Support reality proto

* fix: typo
2023-04-22 16:41:22 +08:00
Senis John
8d0225bcbb fix: On enable global limit, the online device report feat will failure
update: add pushIP method for limiter
2022-11-29 20:42:09 +08:00
Amin
a4ca37b1de Fix sspanel ReportNodeStatus 2022-11-26 00:52:30 +03:30
pocketW
f50c61c782 fix: fix cert storage path 2022-11-11 23:44:43 +11:00
Senis
310353f344 fix: Redundant character escape 2022-11-08 17:50:03 +08:00
Senis
ddce3fa86d fix: typo 2022-11-08 11:57:06 +08:00
Senis
838c667a87 fix: typo 2022-10-27 08:26:23 +08:00
pocketW
710f081025
fix: #37 2022-08-26 13:00:07 +10:00
pocketW
fa51cb5309 fix: fix bug when parsing transport protocol 2022-08-24 09:52:45 +10:00
pocketW
c9895fa02f feat: add support for customize transport protocol 2022-08-17 11:08:56 +10:00
qiuzi
5d6eeb4f29
增加trojan自定义网络协议与加密方式 2022-08-16 16:03:21 +08:00
pocketW
e46dc1d8d7 fix: fix incorrect conversion between integer type 2022-08-02 19:42:29 +10:00
pocketW
b934a52875 fix: fix get cpu usage error in openbsd
fix: fix incorrect conversion between integer types
fix: fix test file error
chore: update dependencies
2022-08-02 19:03:53 +10:00
pocketW
f7d1114fb2 doc: update doc url 2022-07-28 21:50:37 +10:00
pocketW
05ec5660cf
Add files via upload 2022-04-27 14:01:18 +10:00