开发

CroXray URL Scheme #

CroXray 私有分享协议,支持一键打开 App 并导入配置。

请注意:CroXray 私有分享协议不支持订阅。如果您将分享链接放入订阅中,它们将无法导入。

Xray 设置 #

croxray://croxray.yiguo.dev/config/add?core=xray&type=setting&data=yourBase64Data#name

data 为 XrayJson 经过 base64 编码之后的文本,建议您对其进行 encodeURIComponent 转义处理。

name 为配置名称,建议您对其进行 encodeURIComponent 转义处理。

注意:当您希望分享路由配置时,请同时分享关联的规则集数据。下面这种导入方式是支持的。

croxray://croxray.yiguo.dev/dat/add?type=domain&url=yourDownloadLink#name
croxray://croxray.yiguo.dev/dat/add?type=ip&url=yourDownloadLink#name
croxray://croxray.yiguo.dev/config/add?core=xray&type=setting&data=yourBase64Data#name

节点 #

虽然 App 支持这种分享方式,但建议您仍然使用 通用协议 以避免重复开发。

Xray-core #

croxray://croxray.yiguo.dev/config/add?core=xray&type=outbound&data=yourBase64Data#name

data 为 XrayJson 经过 base64 编码之后的文本,建议您对其进行 encodeURIComponent 转义处理。

name 为节点名称,建议您对其进行 encodeURIComponent 转义处理。

Hysteria 2 #

croxray://croxray.yiguo.dev/config/add?core=hysteria2&type=outbound&data=yourBase64Data#name

data 为 Hysteria 2 yaml 经过 base64 编码之后的文本,建议您对其进行 encodeURIComponent 转义处理。

name 为节点名称,建议您对其进行 encodeURIComponent 转义处理。

完整配置 #

“完整配置”仅支持 Xray-core。

croxray://croxray.yiguo.dev/config/add?core=xray&type=full&data=yourBase64Data#name

data 为 XrayJson 经过 base64 编码之后的文本,建议您对其进行 encodeURIComponent 转义处理。

name 为配置名称,建议您对其进行 encodeURIComponent 转义处理。

原始配置 #

Xray-core #

croxray://croxray.yiguo.dev/config/add?core=xray&type=raw&data=yourBase64Data#name

data 为 XrayJson 经过 base64 编码之后的文本,建议您对其进行 encodeURIComponent 转义处理。

name 为配置名称,建议您对其进行 encodeURIComponent 转义处理。

Hysteria 2 #

croxray://croxray.yiguo.dev/config/add?core=hysteria2&type=raw&data=yourBase64Data#name

data 为 Hysteria 2 yaml 经过 base64 编码之后的文本,建议您对其进行 encodeURIComponent 转义处理。

name 为配置名称,建议您对其进行 encodeURIComponent 转义处理。

订阅 #

croxray://croxray.yiguo.dev/sub/add?url=yourDownloadLink#name

url 为订阅链接,建议您对其进行 encodeURIComponent 转义处理。

name 为订阅名称,建议您对其进行 encodeURIComponent 转义处理。

规则集 #

croxray://croxray.yiguo.dev/dat/add?type=domain&url=yourDownloadLink#name

type 为规则集类型,分别 domain (域名)或 ip

url 为规则集下载链接,建议您对其进行 encodeURIComponent 转义处理。

name 为规则集名称,建议您对其进行 encodeURIComponent 转义处理。