mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
fix: read port from environment variable
This commit is contained in:
parent
5e18ae68b7
commit
2f86c7c795
1 changed files with 1 additions and 1 deletions
|
@ -207,7 +207,7 @@ func (list *PortList) UnmarshalJSON(data []byte) error {
|
|||
for _, rangeStr := range rangelist {
|
||||
trimmed := strings.TrimSpace(rangeStr)
|
||||
if len(trimmed) > 0 {
|
||||
if strings.Contains(trimmed, "-") {
|
||||
if strings.Contains(trimmed, "-") || strings.Contains(trimmed, "env:") {
|
||||
from, to, err := parseStringPort(trimmed)
|
||||
if err != nil {
|
||||
return newError("invalid port range: ", trimmed).Base(err)
|
||||
|
|
Loading…
Reference in a new issue