mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-11 02:43:16 +00:00
Compare commits
2 commits
ac9c703c9f
...
80952a9b22
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80952a9b22 | ||
|
|
e42c17f2b2 |
1 changed files with 5 additions and 2 deletions
|
|
@ -80,9 +80,12 @@ type HistoryOfSeeders struct {
|
||||||
// GenXrayInboundConfig generates an Xray inbound configuration from the Inbound model.
|
// GenXrayInboundConfig generates an Xray inbound configuration from the Inbound model.
|
||||||
func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {
|
func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {
|
||||||
listen := i.Listen
|
listen := i.Listen
|
||||||
if listen != "" {
|
// Default to 0.0.0.0 (all interfaces) when listen is empty
|
||||||
listen = fmt.Sprintf("\"%v\"", listen)
|
// This ensures proper dual-stack IPv4/IPv6 binding in systems where bindv6only=0
|
||||||
|
if listen == "" {
|
||||||
|
listen = "0.0.0.0"
|
||||||
}
|
}
|
||||||
|
listen = fmt.Sprintf("\"%v\"", listen)
|
||||||
return &xray.InboundConfig{
|
return &xray.InboundConfig{
|
||||||
Listen: json_util.RawMessage(listen),
|
Listen: json_util.RawMessage(listen),
|
||||||
Port: i.Port,
|
Port: i.Port,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue