Giter Site home page Giter Site logo

[BUG] ping 结果没有渲染 about als HOT 2 CLOSED

Jackxwb avatar Jackxwb commented on July 22, 2024
[BUG] ping 结果没有渲染

from als.

Comments (2)

Jackxwb avatar Jackxwb commented on July 22, 2024

als-master\ui\src\components\Utilities\Ping.vue 第62行

            if (ticket.length == 0 && e[2] == this.host && e.length == 4) {
              ticket = e[3];
              this.wsMessage.splice(i, 1);
              return true;
            }

if里面的 e[2] == this.host ,如果输入的是域名,后端会解析成对应ip地址然后返回,会导致和前端输入的不一样,导致一直程序卡住

from als.

Jackxwb avatar Jackxwb commented on July 22, 2024

或者修改后端第一次返回值
als-master\backend\app\clients\Websocket\Commands\Ping.php 第15行

        $domain = array_shift($args);
        $host = gethostbyname($domain);
        if ($host === false || ($host == $domain && !ip2long($domain))) {
            return $this->end();
        }
        $this->client->send("{$this->commandIndex}|1|{$host}|{$this->ticket}");

最后一行 $host 改成 $domain 可以让前端正确进入后续阶段
image

from als.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.