|
@@ -39,6 +39,8 @@ type TrojanClientConfig struct {
|
|
|
|
|
|
|
|
// Build implements Buildable
|
|
// Build implements Buildable
|
|
|
func (c *TrojanClientConfig) Build() (proto.Message, error) {
|
|
func (c *TrojanClientConfig) Build() (proto.Message, error) {
|
|
|
|
|
+ errors.PrintDeprecatedFeatureWarning("Trojan", "VLESS with flow")
|
|
|
|
|
+
|
|
|
if c.Address != nil {
|
|
if c.Address != nil {
|
|
|
c.Servers = []*TrojanServerTarget{
|
|
c.Servers = []*TrojanServerTarget{
|
|
|
{
|
|
{
|
|
@@ -74,7 +76,7 @@ func (c *TrojanClientConfig) Build() (proto.Message, error) {
|
|
|
config.Server = &protocol.ServerEndpoint{
|
|
config.Server = &protocol.ServerEndpoint{
|
|
|
Address: rec.Address.Build(),
|
|
Address: rec.Address.Build(),
|
|
|
Port: uint32(rec.Port),
|
|
Port: uint32(rec.Port),
|
|
|
- User: &protocol.User{
|
|
|
|
|
|
|
+ User: &protocol.User{
|
|
|
Level: uint32(rec.Level),
|
|
Level: uint32(rec.Level),
|
|
|
Email: rec.Email,
|
|
Email: rec.Email,
|
|
|
Account: serial.ToTypedMessage(&trojan.Account{
|
|
Account: serial.ToTypedMessage(&trojan.Account{
|
|
@@ -115,6 +117,8 @@ type TrojanServerConfig struct {
|
|
|
|
|
|
|
|
// Build implements Buildable
|
|
// Build implements Buildable
|
|
|
func (c *TrojanServerConfig) Build() (proto.Message, error) {
|
|
func (c *TrojanServerConfig) Build() (proto.Message, error) {
|
|
|
|
|
+ errors.PrintDeprecatedFeatureWarning("Trojan", "VLESS with flow")
|
|
|
|
|
+
|
|
|
config := &trojan.ServerConfig{
|
|
config := &trojan.ServerConfig{
|
|
|
Users: make([]*protocol.User, len(c.Clients)),
|
|
Users: make([]*protocol.User, len(c.Clients)),
|
|
|
}
|
|
}
|