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