mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-23 05:59:49 +00: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 {
|
||||
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 New Issue
Block a user