Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration item api->listen. #3317

Merged
merged 3 commits into from
May 2, 2024
Merged

Conversation

vrnobody
Copy link
Contributor

这个pr给api添加一个listen配置项,用于设置grpc服务监听地址。
启用api功能的最小配置:

{
    "log": {
        "loglevel": "debug"
    },
    "api": {
        "tag": "api",
        "listen": "localhost:10085",
        "services": [
            "HandlerService"
        ]
    }
}

优点:
简化配置,不用先添加个dokodemo-door的inbound,然后再添加routing
不怕xray api rmo/rmi "api"之后,自己把自己干掉

缺点:
因为grpc服务器没经过core,所以调用时不会打印日志,api的流量也不会被统计
但是原来的api配置方式仍然可用,如果有这方面需求,可以使用原来的配置方式

下面的unit tests失败应该和这个pr无关

@Fangliding
Copy link
Member

这些细细碎碎pr进来的api选项又没在文档里的东西有多少了

@vrnobody
Copy link
Contributor Author

vrnobody commented May 1, 2024

文档的问题不是那么容易解决。一个pr提出来是有可能被否决掉的,所以在pr阶段就写文档是不现实的。
或者可以这么处理,当core决定接受pr的时候,要求作者先去文档那边提个pr,然后再合并。
但这又有另一个问题,提pr的人得懂nobdejs(我没看过文档的代码,只是看着像vue,所以猜是nodejs)。
同时作者还得懂中文、英文双语,不然机翻出来没法看。
抛开历史问题不谈,文档变成现在这样,主要还是没人专门去维护。

@Fangliding
Copy link
Member

文档的问题不是那么容易解决。一个pr提出来是有可能被否决掉的,所以在pr阶段就写文档是不现实的。 或者可以这么处理,当core决定接受pr的时候,要求作者先去文档那边提个pr,然后再合并。 但这又有另一个问题,提pr的人得懂nobdejs(我没看过文档的代码,只是看着像vue,所以猜是nodejs)。 同时作者还得懂中文、英文双语,不然机翻出来没法看。 抛开历史问题不谈,文档变成现在这样,主要还是没人专门去维护。

js部分只是编译成html要的 写文档只要会markdown(随便找一页点击帮助我们改善此界面就知道了)
至于英文文档一直是欠维护的状态 大多数人都是改的中文 偶然有人翻译一下(

@yuhan6665 yuhan6665 merged commit 447a49d into XTLS:main May 2, 2024
34 checks passed
@yuhan6665
Copy link
Member

感谢佬!还加了测试和用例 👍

bygreencn added a commit to bygreencn/ray-core that referenced this pull request May 4, 2024
* xtls/main:
  Bump github.com/refraction-networking/utls from 1.6.4 to 1.6.5
  Bump lukechampine.com/blake3 from 1.2.2 to 1.3.0
  Bump google.golang.org/protobuf from 1.33.0 to 1.34.0
  Add configuration item api->listen. (XTLS#3317)
@vrnobody vrnobody deleted the api-listen branch May 23, 2024 00:43
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.

None yet

3 participants