Source code statistics traffic problem
liuchengts opened this issue · 1 comments
liuchengts commented
question:
I'm reading the source code of this project and want to develop new features, but I can't find anything related to writing the traffic used by users to the database.
Please tell me how to implement traffic statistics for each user on Trojan? Do you need to use Trojan API?
Supplement: On v2ray, each user has an independent port, so I used iptables combined with periodic scheduled tasks to implement it. However, the trojan ports are all 443. Obviously this solution will not work.
liuchengts commented
I found the answer on this page。https://p4gefau1t.github.io/trojan-go/basic/full-config/