MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    mirai-api-http如何开启远程访问

    HTTP API和第三方SDK
    3
    4
    567
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      syalon last edited by

      使用的腾讯云,这个机子网卡是内网地址,外网地址应该是映射过来的。
      在下面设置的话,
      adapterSettings:
      http:
      host: localhost
      port: xxxxxx
      cors: [*]
      好像从远程是访问不了的。求问如何开启远程访问

      1 Reply Last reply Reply Quote 0
      • yoonching
        yoonching last edited by yoonching

        adapterSettings:
        http:
        host: 0.0.0.0
        port: 28080
        cors: [*]

        这是我的配置,我的腾讯云,能用

        S 1 Reply Last reply Reply Quote 0
        • S
          syalon @yoonching last edited by

          @yoonching 在 mirai-api-http如何开启远程访问 中说:

          adapterSettings:
          http:
          host: 0.0.0.0
          port: 28080
          cors: [*]

          这是我的配置,我的腾讯云,能用

          好的,我试试

          1 Reply Last reply Reply Quote 0
          • H
            huang122124 last edited by

            把host 改成0.0.0.0就可以了

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact