Config: Add Warning for deprecated features (allowInsecure, Shadowsocks, VMess, Trojan, VLESS without flow)

Accelerate!
This commit is contained in:
RPRX
2026-01-18 04:17:25 +00:00
committed by GitHub
parent 6d6c045a5a
commit 5836f36f69
5 changed files with 25 additions and 9 deletions
+5 -1
View File
@@ -39,6 +39,8 @@ type TrojanClientConfig struct {
// Build implements Buildable
func (c *TrojanClientConfig) Build() (proto.Message, error) {
errors.PrintDeprecatedFeatureWarning("Trojan", "VLESS with flow")
if c.Address != nil {
c.Servers = []*TrojanServerTarget{
{
@@ -74,7 +76,7 @@ func (c *TrojanClientConfig) Build() (proto.Message, error) {
config.Server = &protocol.ServerEndpoint{
Address: rec.Address.Build(),
Port: uint32(rec.Port),
User: &protocol.User{
User: &protocol.User{
Level: uint32(rec.Level),
Email: rec.Email,
Account: serial.ToTypedMessage(&trojan.Account{
@@ -115,6 +117,8 @@ type TrojanServerConfig struct {
// Build implements Buildable
func (c *TrojanServerConfig) Build() (proto.Message, error) {
errors.PrintDeprecatedFeatureWarning("Trojan", "VLESS with flow")
config := &trojan.ServerConfig{
Users: make([]*protocol.User, len(c.Clients)),
}