Repository navigation
Expand file tree
/
Copy pathfrps_ini.html
More file actions
161 lines (138 loc) · 5.27 KB
/
Copy pathfrps_ini.html
File metadata and controls
161 lines (138 loc) · 5.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FRPS在线配置系统</title>
<meta name="Keywords" content="内网穿透、frp免费服务器、frpc一键脚本、frps一键脚本、端口映射、frp、frpc、frps、frpc在线配置" />
<meta name="description" content="" />
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?de49f249b7a4558c7daed4df3419bf49";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body id="frps_ini">
<center>
<br />
<h2 align="center">FRPS在线配置系统</h2>
<form id="frps_ini">
<br />
<table border="1">
<tbody>
<tr align="left">
<th bgcolor="#66CCCC">FRP版本:</th>
<td>
<select name="version" id="version" />
<option value="0.9.3">0.9.3</option>
<option value="0.16.1">0.16.1</option>
<option value="0.24.1">0.24.1</option>
</select>
</td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">服务器IP:</th>
<td><input type="text" value="0.0.0.0" name="bind_addr" id="bind_addr" placeholder="建议使用0.0.0.0" />保持默认值</td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">服务器端口:</th>
<td><input type="number" value="7000" name="bind_port" id="bind_port" min=1 max=65535 /> </td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">特权密码:</th>
<td><input type="text" value="frp888" name="privilege_token" id="privilege_token" /></td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">http服务端口:</th>
<td><input type="number" value="80" name="vhost_http_port" id="vhost_http_port" min=1 max=65535 /> </td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">https服务端口:</th>
<td><input type="number" value="443" name="vhost_https_port" id="vhost_https_port" min=1 max=65535 /> </td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">状态查询端口:</th>
<td><input type="number" value="7500" name="dashboard_port" id="dashboard_port" min=1 max=65535 /> </td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">状态查询用户名:</th>
<td><input type="text" value="admin" name="dashboard_user" id="dashboard_user" /> </td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">状态查询密码:</th>
<td><input type="text" value="admin" name="dashboard_pwd" id="dashboard_pwd" /> </td>
</tr>
<tr align="left">
<th bgcolor="#66CCCC">端口开放范围:</th>
<td><input type="text" value="1-65535" name="privilege_allow_ports" id="privilege_allow_ports" min=1 max=65535 /> </td>
</tr>
</tbody>
</table>
<div align="center">
<input name="down" type="button" onclick="down_ini()" value="查看并下载配置文件" />
</div>
</form>
</center>
<script language="javascript">
function down_ini(){
//提示信息
alert("1、检查生成的配置文件是否正确。\r" +
"2、确认配置文件完全正确后,下载配置文件!\r"
);
//表格信息处理
var bind_addr=document.getElementById("bind_addr").value;
var bind_port=document.getElementById("bind_port").value;
var privilege_token=document.getElementById("privilege_token").value;
var vhost_http_port=document.getElementById("vhost_http_port").value;
var vhost_https_port=document.getElementById("vhost_https_port").value;
var dashboard_port=document.getElementById("dashboard_port").value;
var dashboard_user=document.getElementById("dashboard_user").value;
var dashboard_pwd=document.getElementById("dashboard_pwd").value;
var privilege_allow_ports=document.getElementById("privilege_allow_ports").value;
var version=document.getElementById("version").value;
var privilegetoken;
var privilegemode;
var useencryption;
var usecompression;
if (version == "0.9.3") {
privilege = "privilege_";
privilegemode = "privilege_mode = true" + "\r";
} else if (version == "0.16.1") {
privilege = "privilege_";
privilegemode = "";
} else if (version == "0.24.1") {
privilege = "";
privilegemode = "";
} else {
privilege = "";
privilegemode = "";
};
var s="[common]" +"\r\n" +
"bind_addr = " + bind_addr +"\r\n" +
"bind_port = " + bind_port +"\r\n" +
"bind_udp_port = 7001 " +"\r\n" +
"kcp_bind_port = " + bind_port +"\r\n" +
"vhost_http_port = " + vhost_http_port +"\r\n" +
"vhost_https_port = " + vhost_https_port +"\r\n" +
"dashboard_port = " + dashboard_port +"\r\n" +
"dashboard_user = " + dashboard_user +"\r\n" +
"dashboard_pwd = " + dashboard_pwd +"\r\n" +
privilege + "allow_ports = " + privilege_allow_ports +"\r\n" +
privilegemode +
privilege + "token = " + privilege_token +"\r\n" +
"log_max_days = 7 " +"\r\n" +
"max_pool_count = 100 " +"\r\n" +
"log_level = info " +"\r\n" +
"log_file = frps.log " +"\r\n" +
"\r\n"
;
//生成下载页面
document.write("<p align=center><br><input type=button value=下载frps.ini文件></p>"+"\r\n");
document.write("<p align=center>"+"\r\n"+"<textarea rows=20 cols=45 >"+"\r\n"+s+"</textarea>"+"\r\n"+"</p>"+"\r\n");
document.write("<script src=http://www.lu8.win/js/frps.js><\/script>");
}
</script>
</body>
</html>