分类 源码分析 下的文章

wifidog标准流程描述-wifidog原理

一 认证流程描述
  i. Wifidog 运行之后建立一系列的防火墙规则,主要规则起到如下作用:

    1.阻断所有内网到外网的访问。

    2.开通内网到外网的 dns 访问。

    3.开通内网到认证服务器以及域名白名单的访问。

    4.对内网到外网 80 端口的访问转向到 wifidog 自己的 http 服务(2060 端口)。

  ii. 手机、pc 连接上来后,app 或者系统(安卓、ios 会自己连接到各自的服务器上来验证网络的连通性)会发起对外网的访问请求,dns 请求会被放过,然后对应的 80 端口的访问会被指向 2060 的 http 服务,其他的请求都会被拦截。
  iii. Wifidog 的 http 接到 web 请求后,基本上都会被指向 404 页面,404 页面会给客户端一个重定向返回(302),要求客户端重定向访问认证服务器的 login 页面,附加参数 gw_id、gw_address、gw_port、url。
  iv. 手机、pc 客户端加载、显示认证服务器的 login 页面,用户根据页面内容做相关的认证操作(qq 登录、微博登录、用户名密码登录、手机短信登录等多种登录方式) ,原则只有一个认证不成功就仍然让用户停留在认证服务器继续认证操作,认证成功给客户端一个 302 重定向返回,根据 login 接口提交上来的参数 gw_address、gw_port 跳转套 wifidog web 服务的/wifidog/auth 页面上,附带 token 和 url 参数。
  v. Wifidog 的 web 服务收到手机、pc 客户端的/wifidog/auth 请求后,会主动对认证服务器的 auth 接口发起一个验证请求, 附带参数 ip、 mac、 token、 stage=loginvi. 认证服务器的 auth 接口收到 wifidog 的请求, 要根据内部逻辑返回是否允许通过的应答 :

    Auth: 0 拒绝

    Auth: 1 允许

  vii. Wifidog 接收到验证结果后,如果拒绝访问,就会返回 302 给客户端,重定向到认证服务器的 gw_message 接口,附带 message=denied 参数,客户端的上网访问仍然会回到第二步骤;如果允许访问,则改动防火墙规则,开通改客户端的上网(至此客户端已经能够正常上网) ,然后返回 302 重点向给客户端,重定向到认证服务器的 portal 接口,附带参数 gw_id。

  viii. 认证服务器的的 portal 接口根据业务流成显示广告业或者做其他的跳转ix. 整个认证流程完成。

二 ping 心跳流程描述
  i. ping 接口 wifidog 检测认证服务器访问是否正常、并向认证服务器提交 wifidog的运行状态。
  ii. 定时 ping 认证服务器。
  iii. 提交的参数 gw_id、sys_uptime、sys_memfree、wifidog_uptime。

三 auth 心跳流程描述
  i. 和 ping 一样的频率定期请求认证服务器,并且有多少已认证客户端就发多少请求。
  ii. 用来向认证服务器提交客户端的状态以及执行认证服务的验证结果。
  iii. 提交的参数有:ip、mac、token、incoming、outgoing 、stage=counters。
  iv. 如果服务器返回拒绝,则 wifidog 改动防火墙规则,关闭该客户端的上网。

本文章由 http://www.wifidog.pro/2015/03/18/wifidog%E6%A0%87%E5%87%86%E6%B5%81%E7%A8%8B%E6%8F%8F%E8%BF%B0.html 整理编辑,转载请注明出处

wifidog源码分析 - wifidog原理

wifidog是一个用于配合认证服务器实现无线网页认证功能的程序,常见的情景就是使用于公共场合的无线wifi接入点,首先移动设备会连接公共wifi接入点,之后会弹出网页要求输入用户名密码,认证过后才能够连入外网。其主页是http://dev.wifidog.org/

实现原理

  其实wifidog原理很简单,主要是通过管控iptables,配合认证服务器进行客户端的放行操作。wifidog在启动后都会自动启动三个线程,分别为客户端检测线程、wdctrl交互线程、认证服务器心跳检测线程。每当新用户连接无线AP并浏览网页时,wifidog会获取新用户的此次操作,并返回一个重定向到认证服务器的http于用户,此后用户通过认证服务器认证后,再继续浏览网页时,wifidog会询问认证服务器此用户权限,若放行则修改iptables放行此用户IP。

主要流程如下

  • 添加关键路径对应的回调函数
  • 删除所有iptables路由表
  • 建立新的iptables路由表
  • 开启客户端检测线程(用于判断客户端是否在线,是否登出)
  • 开启wdctrl交互线程
  • 开启认证服务器心跳检测线程
  • 循环等待客户端连接(使用socket绑定2060端口并监听,实际上在建立新的iptables路由表规则时会将网关的80端口重定向到2060端口)

回调函数
  回调函数主要用于根据用户http报文执行不同的操作,其原理就是分析http报文请求中有没有关键路径,若有,则执行关键路径对应的回调函数,若没有,则返回一个重定向到认证服务器的包给用户。一次典型的流程为

  • 用户连接无线AP,访问某网站(比如http://www.baidu.com
  • wifidog获取到此http报文,检查是否包含关键路径,没有则返回重定向包给用户,将其重定向到认证服务器
  • 用户认证成功,认证服务器将用户重定向到无线AP网关,并包含关键路径"/wifidog/auth"和token
  • wifidog接收到用户重定向后访问的报文,检测到关键路径"/wifidog/auth",然后访问认证服务器进行token认证
  • 认证成功,wifidog修改iptables放行此用户(根据mac和ip进行放行)

wifidog的iptables规则
  这一部分我没有仔细认真看源码,但可以推论出wifidog是怎么修改iptables的规则的,了解iptables基本原理的同学都清楚iptables实际上有两条路进行数据包处理,一条路会通过应用程序,一条路不同过应用程序,直接到POSTOUTPUT,而我认为wifidog建立的规则是

  • 只要是访问认证服务器的http请求都直接不通过wifidog发送出去
  • 只要是通过认证的客户端wifidog都会修改iptables让其数据直接从FORWARD到POSTOUTPUT,而不经过wifidog
  • 其他行为都必须进过wifidog处理

客户端检测线程
  此线程每隔60s会遍历一次客户端列表,对每一个客户端列表统计流量,如果客户端在60s间隔内没有新产生的流量则不更新客户端的最新更新时间,当当前时间减去最新更新时间大于断线要求时间时,则会将此客户端从客户端列表删除,并修改iptables规则禁止其访问外部网络,然后发送此客户端登出包于认证服务器,认证服务器根据此登出包将此客户端做登出处理。如若没有超出断线要求时间,此线程还会发送客户端状态获取包于认证服务器,认证服务器返回此客户端在认证服务器上的信息,如若信息表示此客户端已在认证服务器上登出,wifidog则会执行此客户端下线操作。

wdctrl交互线程
  其原理是使用unix socket进行进程间通信,具体实现在之后文章中体现

认证服务器心跳检测线程
  原理也很简单,就是每隔60s将路由的一些系统信息发送给认证服务器,认证服务器接收到会返回一个回执

  循环等待客户端连接
  这里主要会接收到两种类型的客户端连接

未认证的客户端打开网页操作,wifidog会接收到此http请求,并返回一个重定向到认证服务器的包于客户端
经过认证服务器认证成功后,认证服务器自动将客户端重定向到无线AP的操作,wifidog接收到此类http请求后会检测关键路径"/tmp/wifidog",并把http请求中携带的token与认证服务器进行认证,认证成功后则修改iptables放行客户端。

具体代码实现见之后章节

本文章由 http://www.wifidog.pro/2015/03/17/wifidog%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90-wifidog%E5%8E%9F%E7%90%86.html 整理编辑,转载请注明出处

wifidog源码分析 - 初始化阶段

Wifidog是一个linux下开源的认证网关软件,它主要用于配合认证服务器实现无线路由器的认证放行功能。
wifidog是一个后台的服务程序,可以通过wdctrl命令对wifidog主程序进行控制。
本文解释wifidog在启动阶段所做的初始化主要工作(代码片段1.1)

  • 初始化配置(先将配置结构体初始化为默认值,在读取配置文件修改配置结构体)
  • 初始化已连接客户端列表(如果是通过wdctrl重启wifidog,将会读取之前wifidog的已连接客户端列表 代码片段1.2
    代码片段1.3)
  • 如无特殊情况,分离进程,建立守护进程 (代码片段1.1)
  • 添加多个http请求回调函数(包括404错误回调函数) (见之后章节)
  • 摧毁删除现有的iptables路由表规则 (见之后章节)
  • 建立新的iptables路由表规则 (见之后章节)
  • 启动多个功能线程 (见之后章节)
  • 循环等待客户端连接 (见之后章节)

代码片段1.1:

int main(int argc, char **argv) {

    s_config *config = config_get_config();  //就是返回全局变量config结构体的地址
    config_init();    //初始化全局变量config结构体为默认值

    parse_commandline(argc, argv);    //根据传入参数执行操作(如果参数有-x则会设置restart_orig_pid为已运行的wifidog的pid)

    /* Initialize the config */
    config_read(config->configfile);    //根据配置文件设置全局变量config结构体
    config_validate();    //判断GatewayInterface和AuthServer是否为空,空则无效退出程序。

    /* Initializes the linked list of connected clients */
    client_list_init();    //将已连接客户端链表置空。

    /* Init the signals to catch chld/quit/etc */
    init_signals();    //初始化一些信号

    if (restart_orig_pid) {    //用于restart,如果有已运行的wifidog,先会kill它
        /*
         * We were restarted and our parent is waiting for us to talk to it over the socket
         */
        get_clients_from_parent();    //从已运行的wifidog中获取客户端列表,详见 代码片段1.2

        /*
         * At this point the parent will start destroying itself and the firewall. Let it finish it's job before we continue
         */

        while (kill(restart_orig_pid, 0) != -1) {    //kill已运行的wifidog
            debug(LOG_INFO, "Waiting for parent PID %d to die before continuing loading", restart_orig_pid);
            sleep(1);
        }

        debug(LOG_INFO, "Parent PID %d seems to be dead. Continuing loading.");
    }

    if (config->daemon) {    //创建为守护进程,config->daemon默认值为-1

        debug(LOG_INFO, "Forking into background");

        switch(safe_fork()) {
            case 0: /* child */
                setsid();    //创建新会话,脱离此终端,实现守护进程
                append_x_restartargv();
                main_loop();    //进入主循环(核心代码在此)。
                break;

            default: /* parent */
                exit(0);
                break;
        }
    }
    else {
        append_x_restartargv();
        main_loop();
    }

    return(0); /* never reached */
}

代码片段1.2(获取已启动的wifidog的客户端列表):

void get_clients_from_parent(void) {
    int sock;
    struct sockaddr_un    sa_un;
    s_config * config = NULL;
    char linebuffer[MAX_BUF];
    int len = 0;
    char *running1 = NULL;
    char *running2 = NULL;
    char *token1 = NULL;
    char *token2 = NULL;
    char onechar;
    char *command = NULL;
    char *key = NULL;
    char *value = NULL;
    t_client * client = NULL;
    t_client * lastclient = NULL;

    config = config_get_config();

    debug(LOG_INFO, "Connecting to parent to download clients");

    /* 连接socket */
    sock = socket(AF_UNIX, SOCK_STREAM, 0);
    memset(&sa_un, 0, sizeof(sa_un));
    sa_un.sun_family = AF_UNIX;
    strncpy(sa_un.sun_path, config->internal_sock, (sizeof(sa_un.sun_path) - 1));    //config->internal_sock的值为"/tmp/wifidog.sock"

    /* 连接已启动的wifidog */
    if (connect(sock, (struct sockaddr *)&sa_un, strlen(sa_un.sun_path) + sizeof(sa_un.sun_family))) {
        debug(LOG_ERR, "Failed to connect to parent (%s) - client list not downloaded", strerror(errno));
        return;
    }

    debug(LOG_INFO, "Connected to parent.  Downloading clients");

    LOCK_CLIENT_LIST();

    command = NULL;
    memset(linebuffer, 0, sizeof(linebuffer));
    len = 0;
    client = NULL;
    /* 接收数据,逐个字符接收 */
    /* 数据包格式为 CLIENT|ip=%s|mac=%s|token=%s|fw_connection_state=%u|fd=%d|counters_incoming=%llu|counters_outgoing=%llu|counters_last_updated=%lu\n */
    while (read(sock, &onechar, 1) == 1) {
        if (onechar == '\n') {
            /* 如果接收到末尾('\n'),则转为'\0' */
            onechar = '\0';
        }
        linebuffer[len++] = onechar;

        if (!onechar) {
            /* 以下将数据转化为t_client结构体添加到客户端列表 */
            debug(LOG_DEBUG, "Received from parent: [%s]", linebuffer);
            running1 = linebuffer;
            while ((token1 = strsep(&running1, "|")) != NULL) {
                if (!command) {
                    /* The first token is the command */
                    command = token1;
                }
                else {
                /* Token1 has something like "foo=bar" */
                    running2 = token1;
                    key = value = NULL;
                    while ((token2 = strsep(&running2, "=")) != NULL) {
                        if (!key) {
                            key = token2;
                        }
                        else if (!value) {
                            value = token2;
                        }
                    }
                }

                if (strcmp(command, "CLIENT") == 0) {
                    /* This line has info about a client in the client list */
                    if (!client) {
                        /* Create a new client struct */
                        client = safe_malloc(sizeof(t_client));
                        memset(client, 0, sizeof(t_client));
                    }
                }

                if (key && value) {
                    if (strcmp(command, "CLIENT") == 0) {
                        /* Assign the key into the appropriate slot in the connection structure */
                        if (strcmp(key, "ip") == 0) {
                            client->ip = safe_strdup(value);
                        }
                        else if (strcmp(key, "mac") == 0) {
                            client->mac = safe_strdup(value);
                        }
                        else if (strcmp(key, "token") == 0) {
                            client->token = safe_strdup(value);
                        }
                        else if (strcmp(key, "fw_connection_state") == 0) {
                            client->fw_connection_state = atoi(value);
                        }
                        else if (strcmp(key, "fd") == 0) {
                            client->fd = atoi(value);
                        }
                        else if (strcmp(key, "counters_incoming") == 0) {
                            client->counters.incoming_history = atoll(value);
                            client->counters.incoming = client->counters.incoming_history;
                        }
                        else if (strcmp(key, "counters_outgoing") == 0) {
                            client->counters.outgoing_history = atoll(value);
                            client->counters.outgoing = client->counters.outgoing_history;
                        }
                        else if (strcmp(key, "counters_last_updated") == 0) {
                            client->counters.last_updated = atol(value);
                        }
                        else {
                            debug(LOG_NOTICE, "I don't know how to inherit key [%s] value [%s] from parent", key, value);
                        }
                    }
                }
            }

            /* End of parsing this command */
            if (client) {
                /* Add this client to the client list */
                if (!firstclient) {
                    firstclient = client;
                    lastclient = firstclient;
                }
                else {
                    lastclient->next = client;
                    lastclient = client;
                }
            }

            /* Clean up */
            command = NULL;
            memset(linebuffer, 0, sizeof(linebuffer));
            len = 0;
            client = NULL;
        }
    }

    UNLOCK_CLIENT_LIST();
    debug(LOG_INFO, "Client list downloaded successfully from parent");

    close(sock);
}

代码片段1.3(已启动的wifidog发送客户端列表到新启动的wifidog):
//thread_wdctl_handler(void *arg)函数是wifidog启动后自动创建的控制线程,主要用于与wdctrl进行socket通信,根据wdctrl命令执行不同的操作。这里我们着重讲解的是wdctrl发送restart后wifidog的执行逻辑。

static void *
thread_wdctl_handler(void *arg)
{
    int    fd,
        done,
        i;
    char    request[MAX_BUF];
    ssize_t    read_bytes,
        len;

    debug(LOG_DEBUG, "Entering thread_wdctl_handler....");

    fd = (int)arg;

    debug(LOG_DEBUG, "Read bytes and stuff from %d", fd);

    /* 初始化变量 */
    read_bytes = 0;
    done = 0;
    memset(request, 0, sizeof(request));

    /* 读取命令 */
    while (!done && read_bytes < (sizeof(request) - 1)) {
        len = read(fd, request + read_bytes,
                sizeof(request) - read_bytes);    //读取wdctrl发送的命令

        /* 判断命令正确性 */
        for (i = read_bytes; i < (read_bytes + len); i++) {
            if (request[i] == '\r' || request[i] == '\n') {
                request[i] = '\0';
                done = 1;
            }
        }

        /* Increment position */
        read_bytes += len;
    }

        //判断命令
    if (strncmp(request, "status", 6) == 0) {
        wdctl_status(fd);
    } else if (strncmp(request, "stop", 4) == 0) {
        wdctl_stop(fd);
    } else if (strncmp(request, "reset", 5) == 0) {
        wdctl_reset(fd, (request + 6));
    } else if (strncmp(request, "restart", 7) == 0) {
        wdctl_restart(fd);    //执行wdctl_restart(int afd)函数
    }

    if (!done) {
        debug(LOG_ERR, "Invalid wdctl request.");
                //关闭套接字
        shutdown(fd, 2);
        close(fd);
        pthread_exit(NULL);
    }

    debug(LOG_DEBUG, "Request received: [%s]", request);

        //关闭套接字
    shutdown(fd, 2);
    close(fd);
    debug(LOG_DEBUG, "Exiting thread_wdctl_handler....");

    return NULL;
}


//wdctl_restart(int afd)函数详解
static void
wdctl_restart(int afd)
{
    int    sock,
        fd;
    char    *sock_name;
    struct     sockaddr_un    sa_un;
    s_config * conf = NULL;
    t_client * client = NULL;
    char * tempstring = NULL;
    pid_t pid;
    ssize_t written;
    socklen_t len;

    conf = config_get_config();

    debug(LOG_NOTICE, "Will restart myself");

    /*
     * 准备内部连接socket
     */
    memset(&sa_un, 0, sizeof(sa_un));
    sock_name = conf->internal_sock;    //conf->internal_sock值为"/tmp/wifidog.sock"
    debug(LOG_DEBUG, "Socket name: %s", sock_name);

    if (strlen(sock_name) > (sizeof(sa_un.sun_path) - 1)) {

        debug(LOG_ERR, "INTERNAL socket name too long");
        return;
    }

    debug(LOG_DEBUG, "Creating socket");
    sock = socket(PF_UNIX, SOCK_STREAM, 0);    //建立内部socket套接字

    debug(LOG_DEBUG, "Got internal socket %d", sock);

    /* 如果sock_name文件存在,则删除*/
    unlink(sock_name);

    debug(LOG_DEBUG, "Filling sockaddr_un");
    strcpy(sa_un.sun_path, sock_name); 
    sa_un.sun_family = AF_UNIX;

    debug(LOG_DEBUG, "Binding socket (%s) (%d)", sa_un.sun_path, strlen(sock_name));


    if (bind(sock, (struct sockaddr *)&sa_un, strlen(sock_name) + sizeof(sa_un.sun_family))) {
        debug(LOG_ERR, "Could not bind internal socket: %s", strerror(errno));
        return;
    }

    if (listen(sock, 5)) {
        debug(LOG_ERR, "Could not listen on internal socket: %s", strerror(errno));
        return;
    }

    /*
     * socket建立完成,创建子进程
     */
    debug(LOG_DEBUG, "Forking in preparation for exec()...");
    pid = safe_fork();
    if (pid > 0) {
        /* 父进程 */

        /* 等待子进程连接此socket :*/
        debug(LOG_DEBUG, "Waiting for child to connect on internal socket");
        len = sizeof(sa_un);
        if ((fd = accept(sock, (struct sockaddr *)&sa_un, &len)) == -1){    //接受连接
            debug(LOG_ERR, "Accept failed on internal socket: %s", strerror(errno));
            close(sock);
            return;
        }

        close(sock);

        debug(LOG_DEBUG, "Received connection from child.  Sending them all existing clients");

        /*子进程已经完成连接,发送客户端列表 */
        LOCK_CLIENT_LIST();
        client = client_get_first_client();    //获取第一个客户端
        while (client) {
            /* Send this client */
            safe_asprintf(&tempstring, "CLIENT|ip=%s|mac=%s|token=%s|fw_connection_state=%u|fd=%d|counters_incoming=%llu|counters_outgoing=%llu|counters_last_updated=%lu\n", client->ip, client->mac, client->token, client->fw_connection_state, client->fd, client->counters.incoming, client->counters.outgoing, client->counters.last_updated);
            debug(LOG_DEBUG, "Sending to child client data: %s", tempstring);
            len = 0;
            while (len != strlen(tempstring)) {
                written = write(fd, (tempstring + len), strlen(tempstring) - len);    //发送给子进程
                if (written == -1) {
                    debug(LOG_ERR, "Failed to write client data to child: %s", strerror(errno));
                    free(tempstring);
                    break;
                }
                else {
                    len += written;
                }
            }
            free(tempstring);
            client = client->next;
        }
        UNLOCK_CLIENT_LIST();

        close(fd);

        debug(LOG_INFO, "Sent all existing clients to child.  Committing suicide!");

        shutdown(afd, 2);
        close(afd);


        wdctl_stop(afd);
    }
    else {
        /* 子进程,先关闭资源 */
        close(wdctl_socket_server);
        close(icmp_fd);
        close(sock);
        shutdown(afd, 2);
        close(afd);
        debug(LOG_NOTICE, "Re-executing myself (%s)", restartargv[0]);

        setsid();
        execvp(restartargv[0], restartargv);    //执行外部命令,这里重新启动wifidog

        debug(LOG_ERR, "I failed to re-execute myself: %s", strerror(errno));
        debug(LOG_ERR, "Exiting without cleanup");
        exit(1);
    }
}

小结
客户端列表只有在restart命令中才会执行,实际上流程就是

父wifidog准备socket
父wifidog启动子wifidog
子wifidog连接父wifidog
客户端列表传递
子wifidog终止父wifidog

本文章由 http://www.wifidog.pro/2015/03/17/wifidog%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90-6.html整理编辑,转载请注明出处

wifidog认证wifidog路由接口文档分析wifidog 原理

概述

wifidog是搭建无线热点认证系统的解决方案之一,他比nocat更适合互联网营销思路。目前支持openwrt系统,他实现了路由器和认证服务器的数据交互,在路由器方是用C语言代码,通过wifidog程序和linux iptables防火墙实现接入用户的认证跳转和控制,在认证服务器方是通过php实现用户的认证流程和管理。
优点:有开源代码,可以很方便的搭建认证系统。
缺点:通过iptables方式实现,性能比较差,整体拉低了路由器的数据包处理速度,协议比较繁琐,对认证服务器的造成性能损耗比较大,在安全方面都是明文传输,有一定的安全隐患。

认证流程图:
wifidog-flow-2009.png

网关心跳协议

Wifidog将ping协议作为心跳机制向认证服务器发送当前状态信息。实现认证服务器和每个节点的状态双向健康监测的机制。

请求信息:
http://auth_sever/ping/? gw_id=%s sys_load=%lu sys_memfree=%u sys_load=%.2f wifidog_uptime=%lu

回复格式:
Pong

例子:
GET/ping/? gw_id=001217DA42D2&sys_uptime=742725&sys_memfree=2604&sys_load=0.03&wifidog_uptime

用户状态心跳协议

请求格式:
http://auth_server/auth/? stage= ip= mac= token= incoming= outgoing=

注意:
ip,mac,token为用户的基本信息,incoming/outgoing为用户的连接计数信息。 stage=counter|login|logout,分别表示:已认证,新认证用户,超时需要删除的用户。

回复格式:
Auth:状态码(注意中间冒号和状态码之间有个空格)

状态码:
0-AUTH_DENIED-Userfirewallusersaredeletedandtheuserremoved. 1-AUTH_ALLOWED-Userwasvalid,addfirewallrulesifnotpresent

例子:
GET/auth/?stage=counters&ip=7.0.0.107&mac=00:40:05:5F:44:43&token=4f473ae3ddc5c1c2165f7a0973c57a98&incoming=6031353&outgoing=827770HTTP/1.0 User-Agent:cnrouterwifidog Host:auth.cnrouter.com

跳转协议

对于新连接用户,路由器将其产生的任意url请求通过302重定向到认证平台。
请求格式:
http://auth_server/login/? gw_id= gw_address= gw_port= mac= url=

例子:
GET/login/? gw_id=808100949391&gw_address=192.168.81.1&gw_port=80&mac=aa:bb:cc:dd:cc:ee&url=http://www.sina.com.cn/HTTP/1.0 User-Agent:cnrouterwifidog Host:auth.cnrouter.com

注册协议

请求格式:
http://gw_ip/wifidog/auth? token=

例子:
GET wifidog/auth?token=12312412124 User-Agent:iphone Host:路由器ip 注册请求成功,以307的方式跳转平台的portal/?gw_id=

本文章由 http://www.wifidog.pro/2015/03/17/wifidog%E8%AE%A4%E8%AF%81%E8%B7%AF%E7%94%B1%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3.html整理编辑,转载请注明出处