Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Web certification how to release different operating systems

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In the Web authentication configuration of WFilter NGF (WSG Internet behavior Management Gateway), the client to be authenticated by Web can be configured based on the IP scope. In practical use, some LAN computers and mobile phone wireless terminals are mixed in the same network segment, in this case, if only the computer authentication, or only the mobile phone authentication, can not be achieved through the IP range. You need to modify the default authentication page, obtain the client operating system type based on the browser's useragent, and determine whether to release it (directly without authentication).

As shown in the following figure, click "Edit Web Authentication Page", and then click the source code icon.

You can view the Web certified interface source code.

Add a function to it, as follows:

Function checkbypassPC () {

/ / alert ("userAgent=" + window.navigator.userAgent)

If (window.navigator.userAgent! = undefined & & window.navigator.userAgent.indexOf ("Windows") >-1) {

/ / if it is a windows system, bypass automatically.

$.ajax ("/ cgi-bin/verify?tid=bypasspc", {

Method: 'GET'

Cache: false

DataType: 'text'

Success: function (data) {

/ / Jump to the jump page of successful verification

Check_landing_page ()

}

});

}

}

As shown below:

Then switch to edit mode and click Save. (note: do not save in source code mode)

After the above configuration, the authentication can be completed automatically after jumping out of the authentication page on the PC, and there is no need to scan the code. If you do not want to authenticate the phone, you can directly modify the useragent in the function, as follows:

Function checkbypassPC () {

/ / alert ("userAgent=" + window.navigator.userAgent)

If (/ Android | webOS | iPhone | iPad | iPod | Opera Mini/i.test (window.navigator.userAgent)) {

/ / Android, iphone, ipad automatic bypass.

$.ajax ("/ cgi-bin/verify?tid=bypasspc", {

Method: 'GET'

Cache: false

DataType: 'text'

Success: function (data) {

/ / Jump to the jump page of successful verification

Check_landing_page ()

}

});

}

}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report