Skip to content

Commit

Permalink
support ss altport (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibigbug authored Jan 8, 2025
1 parent 85e52b7 commit 221cac7
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 399 deletions.
7 changes: 7 additions & 0 deletions api/apimodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"
"fmt"
"regexp"

"github.com/xtls/xray-core/infra/conf"
Expand Down Expand Up @@ -62,6 +63,7 @@ type NodeInfo struct {
NodeType string // Must be V2ray, Trojan, and Shadowsocks
NodeID string
Port uint32
AltPort uint16 // AltPort is used for Shadowsocks-Plugin
SpeedLimit uint64 // Bps
AlterID uint16
TransportProtocol string
Expand Down Expand Up @@ -100,6 +102,11 @@ type NodeInfo struct {
RejectUnknownSni bool
}

func (n *NodeInfo) Tag(listenIP string, port uint32) string {
return fmt.Sprintf("%s_%s_%d", n.NodeType, listenIP, port)

}

Check failure on line 108 in api/apimodel.go

View workflow job for this annotation

GitHub Actions / lint

unnecessary trailing newline (whitespace)

type UserInfo struct {
UID int
Email string
Expand Down
Loading

0 comments on commit 221cac7

Please sign in to comment.