Trojan Panel Core
- Xray
- Trojan Go
- Hysteria1/Hysteria2
- NaiveProxy
Default data processing:
- Read/write username, pass, hash, quota, download, upload, ip_limit, download_speed_limit, upload_speed_limit in account. pass, hash needs to be hashed, quota, upload, download, download_speed_limit, upload_speed_limit unit is byte
Main logic:
- API real-time update (database to application) valid account: account.quota < 0 or account.download + account.upload < account.quota
- Regularly update account.download, account.upload
- account.quota=0, the user is disabled
create table trojan_panel_db.account
(
id bigint(10) unsigned auto_increment comment 'auto increment primary key'
primary key,
username varchar(64) default '' not null comment 'login username',
pass varchar(64) default '' not null comment 'login password',
hash varchar(64) default '' not null comment 'hash of pass',
quota bigint default 0 not null comment 'quota unit/byte',
download bigint unsigned default 0 not null comment 'download unit/byte',
upload bigint unsigned default 0 not null comment 'upload unit/byte',
ip_limit tinyint(2) unsigned default 3 not null comment 'limit the number of IP devices',
download_speed_limit bigint unsigned default 0 not null comment 'download speed limit unit/byte',
upload_speed_limit bigint unsigned default 0 not null comment 'upload speed limit unit/byte',
);
router->api->middleware->app->service/dao->core
Telegram Channel: https://t.me/jonssonyan_channel
You can subscribe to my channel on YouTube: https://www.youtube.com/@jonssonyan