Skip to content

Conversation

@Jolymmiles
Copy link
Contributor

@Jolymmiles Jolymmiles commented Aug 14, 2025

#4994

Implementation for fr.

How it work.

If defaultFlow isn't set than defaultFlow is "" and all core logic work like in previous versions. But, when we set defaultFlow, then if client don't have flow, then will be set flow from defaultFlow. Its optional parameter.

"settings": {
        "defaultFlow": "xtls-rprx-vision",
        "clients": [
          {
            "id": "c481e5e7-2796-491d-ac55-00e3c1e0acc3",
            "email": "sOoqSgPC2rHuTWRCPLt3"
          }
        ],
        "decryption": "none"
      }

@RPRX
Copy link
Member

RPRX commented Aug 14, 2025

命名为 "flow" 就行了

@Jolymmiles
Copy link
Contributor Author

命名为 "flow" 就行了

done

@patterniha
Copy link
Collaborator

also check c.Flow is vless.XRV/""

@Jolymmiles
Copy link
Contributor Author

also check c.Flow is vless.XRV/""

Good idea, thx

@Jolymmiles
Copy link
Contributor Author

also check c.Flow is vless.XRV/""

done

@patterniha
Copy link
Collaborator

patterniha commented Aug 15, 2025

also check c.Flow is vless.XRV/""

done

Check before for loop, c.Flow is fixed, one time check is enough.

@Jolymmiles
Copy link
Contributor Author

also check c.Flow is vless.XRV/""

done

Check before for loop, c.Flow is fixed, one time check is enough.

done

@patterniha
Copy link
Collaborator

patterniha commented Aug 15, 2025

it has a problem,
"flow": "VLESS.XRV" can override "defaultFlow": "",
but "flow": "" can't override "defaultFlow": "VLESS.XRV"

In short, when defaultFlow is vless.XRV, we cannot set no-flow for a user.

///

We can set "no-flow" as a alias for "".

@Jolymmiles
Copy link
Contributor Author

it has a problem, "flow": "VLESS.XRV" can override "defaultFlow": "", but "flow": "" can't override "defaultFlow": "VLESS.XRV"

In short, when defaultFlow is vless.XRV, we cannot set no-flow for a user.

///

We can set "no-flow" as a alias for "".

done

@Fangliding
Copy link
Member

不应该是"none"吗

@Jolymmiles
Copy link
Contributor Author

不应该是"none"吗

done

@ImMohammad20000
Copy link

If we set default flow to xtls-rprx-vision and user flow to ""
Witch will use?

@patterniha
Copy link
Collaborator

@Jolymmiles

switch c.Flow {
	case "", vless.XRV, vless.NoFLow:
	default:
		return nil, errors.New(`VLESS "settings.flow" doesn't support "` + c.Flow + `" in this version`)
}

should change to:

switch c.Flow {
    case vless.NoFLow:
        c.Flow =""
	case "", vless.XRV:
	default:
		return nil, errors.New(`VLESS "settings.flow" doesn't support "` + c.Flow + `" in this version`)

@patterniha
Copy link
Collaborator

If we set default flow to xtls-rprx-vision and user flow to "" Witch will use?

now "" means use defaultFlow, doc needs to be updated.

@Jolymmiles
Copy link
Contributor Author

@Jolymmiles

switch c.Flow {
	case "", vless.XRV, vless.NoFLow:
	default:
		return nil, errors.New(`VLESS "settings.flow" doesn't support "` + c.Flow + `" in this version`)
}

should change to:

switch c.Flow {
    case vless.NoFLow:
        c.Flow =""
	case "", vless.XRV:
	default:
		return nil, errors.New(`VLESS "settings.flow" doesn't support "` + c.Flow + `" in this version`)

done

@Jolymmiles
Copy link
Contributor Author

If we set default flow to xtls-rprx-vision and user flow to "" Witch will use?

now "" means use defaultFlow, doc needs to be updated.

@iambabyninja could you help pls?

@iambabyninja
Copy link
Member

If we set default flow to xtls-rprx-vision and user flow to "" Witch will use?

now "" means use defaultFlow, doc needs to be updated.

@iambabyninja could you help pls?

如果这个 PR 被接受,我会更新俄文文档。

@Jolymmiles
Copy link
Contributor Author

Jolymmiles commented Aug 15, 2025

@RPRX ready to merge

@RPRX
Copy link
Member

RPRX commented Aug 15, 2025

@Jolymmiles

@Jolymmiles
Copy link
Contributor Author

@Jolymmiles

done

@Jolymmiles
Copy link
Contributor Author

Jolymmiles commented Aug 15, 2025

rebased on main

@RPRX
Copy link
Member

RPRX commented Aug 15, 2025

  1. proxy/vless/vless.go 需要将 None 放到 XRV 上面
  2. 需要重新 rebase 一下,现在看起来怪怪的

@Jolymmiles Jolymmiles force-pushed the feature/default-flow-vless branch from 11d980f to 90196e3 Compare August 15, 2025 21:45
@Jolymmiles
Copy link
Contributor Author

  1. proxy/vless/vless.go 需要将 None 放到 XRV 上面
  2. 需要重新 rebase 一下,现在看起来怪怪的

done

@RPRX RPRX changed the title feat: add option to set default flow. VLESS inbound: Add option to set default flow Aug 15, 2025
@RPRX RPRX merged commit aac0d6a into XTLS:main Aug 15, 2025
39 checks passed
@Jolymmiles Jolymmiles deleted the feature/default-flow-vless branch August 16, 2025 09:00
maoxikun pushed a commit to maoxikun/Xray-core that referenced this pull request Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants