日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

wifidog java_wifidog 配置中文说明

發布時間:2025/3/15 编程问答 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 wifidog java_wifidog 配置中文说明 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

#網關ID

GatewayID default

#外部網卡

ExternalInterface eth0

#無線網卡

GatewayInterface eth0

#無線IP

GatewayAddress 192.168.1.1

#路由狀態HTML

HtmlMessageFile wifidog-msg.html

#驗證服務器

#AuthServer {

#?? ?Hostname???????????????? (Mandatory; Default: NONE)

#?? ?SSLAvailable???????????? (Optional; Default: no; Possible values: yes, no)

#?? ?SSLPort????????????????? (Optional; Default: 443)

#?? ?HTTPPort???????????????? (Optional; Default: 80)

#?? ?Path???????????????????? (Optional; Default: /wifidog/ Note:? The path must be both prefixed and suffixed by /.? Use a single / for server root.)

#?? LoginScriptPathFragment? (Optional; Default: login/? Note:? 未用戶登錄重定向地址.)

#?? PortalScriptPathFragment (Optional; Default: portal/? Note:? 登錄成功后重定向地址.)

#?? MsgScriptPathFragment??? (Optional; Default: gw_message.php? Note:? 退出登錄后重定向地址.)

#?? PingScriptPathFragment??? (Optional; Default: ping/? Note:? 路由狀態心跳地址.)

#?? AuthScriptPathFragment??? (Optional; Default: auth/? Note:? 路由請求服務器驗證地址 and 驗證心跳地址(stage=counters).)

#}

AuthServer {

Hostname auth.com

#SSLAvailable yes

Path /

}

# 是否后臺進程

# Daemon 1

#默認網關端口

# Default: 2060

GatewayPort 80

# HTTP進程名

# HTTPDName WiFiDog

# HTTP最大連接數

# Default: 10

# HTTPDMaxConn 10

# WEB頁面加密碼后顯示名

# Default: WiFiDog

# HTTPDRealm WiFiDog

# WEB加驗證

# HTTPDUserName admin

# HTTPDPassword secret

# 心跳間隔時間

# Default: 60

CheckInterval 60

# 心跳間隔次數 驗證超時數等于 CheckInterval*ClientTimeout

ClientTimeout 2

# 信任的MAC地址,加入信任列表將不用登錄可訪問

#TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D

#其他防火墻設置

#全局

FirewallRuleSet global {

## To block SMTP out, as it's a tech support nightmare, and a legal liability

#FirewallRule block tcp port 25

## Use the following if you don't want clients to be able to access machines on

## the private LAN that gives internet access to wifidog.? Note that this is not

## client isolation;? The laptops will still be able to talk to one another, as

## well as to any machine bridged to the wifi of the router.

# FirewallRule block to 192.168.0.0/16

# FirewallRule block to 172.16.0.0/12

# FirewallRule block to 10.0.0.0/8

## This is an example ruleset for the Teliphone service.

#FirewallRule allow udp to 69.90.89.192/27

#FirewallRule allow udp to 69.90.85.0/27

#FirewallRule allow tcp port 80 to 69.90.89.205

}

# 新驗證用戶

FirewallRuleSet validating-users {

FirewallRule allow to 0.0.0.0/0

}

#正常用戶

FirewallRuleSet known-users {

FirewallRule allow to 0.0.0.0/0

}

#未知用戶

FirewallRuleSet unknown-users {

#域名已修改源碼實現,直接下載的不行的...

FirewallRule allow to baidu.com

FirewallRule allow udp port 53

FirewallRule allow tcp port 53

FirewallRule allow udp port 67

FirewallRule allow tcp port 67

}

#鎖住用戶

FirewallRuleSet locked-users {

FirewallRule block to 0.0.0.0/0

}

域名過濾支持:

fw_iptables.c

iptables_compile 修改:

if (rule->mask != NULL) {

char *mask=rule->mask;

int mask_len=strlen(mask);

int is_domain=0,

i=0;

for(;i

if((mask[i]>=46&&mask[i]<=57)||mask[i]==32){

continue;

}else{

is_domain=1;

break;

}

}

char * ip =NULL;

if(is_domain){

struct in_addr * h_addr =wd_gethostbyname(mask);

if(h_addr){

ip= safe_strdup(inet_ntoa(*h_addr));

free(h_addr);

}

if(ip){

mask=ip;

}else{

debug(LOG_ERR, "doamin %s not find ip try again!",mask);

mask="0.0.0.0";

}

}

snprintf((command + strlen(command)), (sizeof(command) -

strlen(command)), "-d %s ", mask);

if(ip){

free(ip);

}

}

conf.c

_parse_firewall_rule 修改:

for (i = 0; *(mask + i) != '\0'; i++)

if (!isdigit((unsigned char)*(mask + i))

&&!isalpha((unsigned char)*(mask + i))

&& (*(mask + i) != '-')

&& (*(mask + i) != '.')

&& (*(mask + i) != '/'))

all_nums = 0; /*< No longer only digits */

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的wifidog java_wifidog 配置中文说明的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。