3x-ui/xray/inbound.go
mhsanaei 0c7b59ed47
Some checks failed
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
removed: Allocate
2025-08-28 10:15:04 +02:00

42 lines
990 B
Go

package xray
import (
"bytes"
"x-ui/util/json_util"
)
type InboundConfig struct {
Listen json_util.RawMessage `json:"listen"` // listen cannot be an empty string
Port int `json:"port"`
Protocol string `json:"protocol"`
Settings json_util.RawMessage `json:"settings"`
StreamSettings json_util.RawMessage `json:"streamSettings"`
Tag string `json:"tag"`
Sniffing json_util.RawMessage `json:"sniffing"`
}
func (c *InboundConfig) Equals(other *InboundConfig) bool {
if !bytes.Equal(c.Listen, other.Listen) {
return false
}
if c.Port != other.Port {
return false
}
if c.Protocol != other.Protocol {
return false
}
if !bytes.Equal(c.Settings, other.Settings) {
return false
}
if !bytes.Equal(c.StreamSettings, other.StreamSettings) {
return false
}
if c.Tag != other.Tag {
return false
}
if !bytes.Equal(c.Sniffing, other.Sniffing) {
return false
}
return true
}