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

[Bug] HTTP服务器监听abstract unix domain socket时不能工作 #830

Open
4 tasks done
TargetLocked opened this issue Aug 15, 2024 · 0 comments · May be fixed by #831
Open
4 tasks done

[Bug] HTTP服务器监听abstract unix domain socket时不能工作 #830

TargetLocked opened this issue Aug 15, 2024 · 0 comments · May be fixed by #831

Comments

@TargetLocked
Copy link

在提交之前,请确认

  • 我已经尝试搜索过 Issue ,但没有找到相关问题。
  • 我正在使用最新的 mosdns 版本(或者最新的 commit),问题依旧存在。
  • 我仔细看过 wiki 后仍然无法自行解决该问题。
  • 我非常确定这是 mosdns 核心的问题。(如果是通过第三方衍生软件使用 mosdns 核心,不确定问题源头时,请先向衍生软件开发者提交问题。)

mosdns 版本

v5.3.1-0-ga281fdb

操作系统

ubuntu 20.04

Bug 描述和复现步骤

复现:

curl -H 'accept: application/dns-message' --abstract-unix-socket 'some_uds' 'http://localhost/dns-query?dns=q80BAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' -vvvs > /dev/null
*   Trying :0...
* Connected to localhost () port 80 (#0)
> GET /dns-query?dns=q80BAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB HTTP/1.1
> Host: localhost
> User-Agent: curl/7.68.0
> accept: application/dns-message
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Date: Thu, 15 Aug 2024 13:22:00 GMT
< Content-Length: 0
< 
* Connection #0 to host localhost left intact

使用的配置文件

log:
    level: info
plugins:
    - args:
        upstreams:
            - addr: 114.114.114.114
      tag: forward
      type: forward
    - args:
        entries:
          - path: /dns-query
            exec: forward
        listen: "@some_uds"
      tag: http_server
      type: http_server

mosdns 的 log 记录

2024-08-15T21:18:35.135+0800    INFO    main config loaded      {"file": "test.yml"}
2024-08-15T21:18:35.135+0800    INFO    loading plugin  {"tag": "forward", "type": "forward"}
2024-08-15T21:18:35.135+0800    INFO    loading plugin  {"tag": "http_server", "type": "http_server"}
2024-08-15T21:18:35.136+0800    INFO    http_server     http server started     {"addr": "@some_uds"}
2024-08-15T21:18:35.136+0800    INFO    all plugins are loaded
2024-08-15T21:21:46.619+0800    ERROR   http_server     failed to parse request remote addr     {"addr": "@", "error": "not an ip:port"}
2024-08-15T21:21:57.276+0800    ERROR   http_server     failed to parse request remote addr     {"addr": "@", "error": "not an ip:port"}
2024-08-15T21:22:00.970+0800    ERROR   http_server     failed to parse request remote addr     {"addr": "@", "error": "not an ip:port"}
2024-08-15T21:23:34.284+0800  WARN    signal received {"signal": "interrupt"}
2024-08-15T21:23:34.284+0800    INFO    starting shutdown sequences
2024-08-15T21:23:34.284+0800    INFO    closing plugin  {"tag": "forward"}
2024-08-15T21:23:34.284+0800    INFO    closing plugin  {"tag": "http_server"}
2024-08-15T21:23:34.284+0800    INFO    all plugins were closed
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 a pull request may close this issue.

1 participant