36 Commits

Author SHA1 Message Date
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 John
b1bfd04895
Refactor main to use Cobra command line framework and package restructure
Reorganized the Go package structure, moving the main package to 'cmd'. Upgraded the flag library to Cobra for better management of CLI commands. This included moving the X25519 key generation from a flag to its own standalone Cobra command, which improves user interaction and code modularity. This structural change will benefit future additions and code maintainability.
2023-10-14 11:21:45 +08:00
Senis John
edf02307ad
Update Go dependencies and add secure key pair generation
Updated several Go dependencies for enhanced security and performance. Additionally, a command (`-x25519`) has been added for generating a secure key pair using X25519. This provides an easier and safer way for users to generate keys for secure communication. Further instructions have been reflected in the `config.yml.example` file.
2023-10-13 21:55:30 +08:00
Senis John
e34a3b4a94
Update dependencies and replace go-redis with redis library
Replaced go-redis older version with a more updated version of redis library in limiter.go and go.mod files. This change will help to improve the performance and efficiency of the existing code. Updated the versions of 'gocache/store/redis/v4' and 'bsm/gomega' in go.sum and go.mod files to keep the project's dependencies up-to-date and fix potential security vulnerabilities. Removed the unnecessary indirect dependency 'go-redis/redis/v8' from go.sum file. Added 'redis/go-redis/v9' instead, to ensure compatibility with the newer version of Redis.
2023-09-12 17:28:27 +08:00
Senis John
eea6c0dea6
fix: typo 2022-12-11 06:51:25 +08:00
pocketW
be4f9cdac1 reduce clear interval 2022-12-07 21:58:12 +11:00
Senis John
9a06f78653
fix: Add deviceLimit to the prefix of email string
Solve different node and different device limit the less limit node cannot work normally.
2022-12-07 18:49:08 +08:00
Senis John
85d73408c3
update: refactor global limit cache. Use gocache lib for level 2 cache
fix: shadowsocks2022 init feat
2022-12-07 13:29:05 +08:00
pocketW
5397720430 fix: expire time error 2022-12-03 19:17:33 +11:00
pocketW
839b15c22c fix: fix condition of check cert service
fix: check devices on redis first
2022-12-03 14:28:32 +11:00
Senis John
5b45b8ffe8
fix: refactor the InboundInfo struct
Global limit can separate settings for each node
2022-12-03 09:11:43 +08:00
Senis John
b6600729b2 update: code clean 2022-11-30 09:13:35 +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
thank243
d320aadb54
fix: global limit will failure on some situation (#124)
fix: typo
2022-11-28 11:16:27 +08:00
thank243
40ae48f507
update: refactor the global limit (#121)
fix: some log prefix

It an enhance device limit. Redis just use to sync local ipMap.
If global limit is enabled. The online report will faliure. All enabled nodes will report the device from redis.
2022-11-27 10:12:30 +08:00
pocketW
d1bc36782b add timeout 2022-11-26 21:44:14 +11:00
AikoCute
c04330d0bf Merge branch 'master' of https://github.com/Github-Aiko/XrayR-Real 2022-11-26 16:14:06 +07:00
AikoCute
872eb12d35 Check Connect Redis Server 2022-11-26 16:13:45 +07:00
pocketW
2f10c3f6b8 revert error format 2022-11-20 14:57:20 +11:00
AikoCute
86324ff1ae Logs for GlobalDeviceLimit 2022-11-20 10:10:03 +07:00
Senis
e0237f5c54 fix: http mode not working
fix: use "email|uid" for global limit user identify
update: tls alpn challenge for apply certificate
2022-11-16 12:59:44 +08:00
pocketW
a6a1baf70c
Merge pull request #89 from thank243/master
fix: adding the issuers certificate to the new certificate
2022-11-12 02:25:54 +11:00
pocketW
4013f71e4c fix: update global device limit 2022-11-12 02:22:53 +11:00
Senis
5274edf657 fix: adding the issuers certificate to the new certificate 2022-11-11 22:42:31 +08:00
pocketW
f50c61c782 fix: fix cert storage path 2022-11-11 23:44:43 +11:00
Senis
c4ef5bb843 update: xray-core v1.6.3 2022-11-08 14:46:06 +08:00
Senis
ddce3fa86d fix: typo 2022-11-08 11:57:06 +08:00
Senis
209f5a17d6 update: rebuild the implementation of legocmd 2022-11-08 11:13:27 +08:00
Senis
a397af5d73 fix: init global limit 2022-11-04 14:36:34 +08:00
Senis
b47954ea64 fix: minor bugs 2022-11-04 08:58:41 +08:00
Senis
9a2188cb0c update: Global User IP limit. 2022-11-04 08:26:56 +08:00
Senis
838c667a87 fix: typo 2022-10-27 08:26:23 +08:00
pocketW
79528d3e17 feat: dynamic update speedlimit bucket 2022-10-13 08:37:59 +11:00
pocketW
cbffafbb4c fix: fix CF dns env error #51 2022-09-18 14:19:55 +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
05ec5660cf
Add files via upload 2022-04-27 14:01:18 +10:00