optimize view & net config
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @@ -8,7 +8,7 @@ LUCI_TITLE:=LuCI for Tailscale | |||||||
| LUCI_DEPENDS:=+tailscale +jsonfilter +ucode | LUCI_DEPENDS:=+tailscale +jsonfilter +ucode | ||||||
| LUCI_PKGARCH:=all | LUCI_PKGARCH:=all | ||||||
|  |  | ||||||
| PKG_VERSION:=1.0.4 | PKG_VERSION:=1.0.5 | ||||||
|  |  | ||||||
| include $(TOPDIR)/feeds/luci/luci.mk | include $(TOPDIR)/feeds/luci/luci.mk | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,30 +18,29 @@ var callServiceList = rpc.declare({ | |||||||
| 	expect: { '': {} } | 	expect: { '': {} } | ||||||
| }); | }); | ||||||
|  |  | ||||||
| function getServiceStatus() { | function getStatus() { | ||||||
|  | 	var status = {}; | ||||||
| 	return Promise.resolve(callServiceList('tailscale')).then(function (res) { | 	return Promise.resolve(callServiceList('tailscale')).then(function (res) { | ||||||
| 		var isRunning = false; |  | ||||||
| 		try { | 		try { | ||||||
| 			isRunning = res['tailscale']['instances']['instance1']['running']; | 			status.isRunning = res['tailscale']['instances']['instance1']['running']; | ||||||
| 		} catch (e) { } | 		} catch (e) { | ||||||
| 		return isRunning; | 			status.isRunning = false; | ||||||
| 	}); |  | ||||||
| 		} | 		} | ||||||
|  | 		return fs.exec("/usr/sbin/tailscale", ["status", "--json"]); | ||||||
| function getLoginStatus() { | 	}).then(function(res) { | ||||||
| 	return fs.exec("/usr/sbin/tailscale", ["status", "--json"]).then(function(res) { | 		var tailscaleStatus = JSON.parse(res.stdout); | ||||||
| 		var status = JSON.parse(res.stdout); | 		if (!tailscaleStatus.AuthURL && tailscaleStatus.BackendState == "NeedsLogin") { | ||||||
| 		if (!status.AuthURL && status.BackendState == "NeedsLogin") { |  | ||||||
| 			fs.exec("/usr/sbin/tailscale", ["login"]); | 			fs.exec("/usr/sbin/tailscale", ["login"]); | ||||||
| 		} | 		} | ||||||
| 		var displayName = status.BackendState == "Running" ? status.User[status.Self.UserID].DisplayName : undefined; | 		status.backendState = tailscaleStatus.BackendState; | ||||||
| 		return { | 		status.authURL = tailscaleStatus.AuthURL; | ||||||
| 			backendState: status.BackendState, | 		status.displayName = status.backendState == "Running" ? tailscaleStatus.User[tailscaleStatus.Self.UserID].DisplayName : undefined; | ||||||
| 			authURL: status.AuthURL, | 		return status; | ||||||
| 			displayName: displayName |  | ||||||
| 		}; |  | ||||||
| 	}).catch(function(error) { | 	}).catch(function(error) { | ||||||
| 		return { backendState: undefined, authURL: undefined, displayName: undefined }; | 		status.backendState = undefined; | ||||||
|  | 		status.authURL = undefined; | ||||||
|  | 		status.displayName = undefined; | ||||||
|  | 		return status; | ||||||
| 	}); | 	}); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -75,8 +74,7 @@ function renderLogin(loginStatus, authURL, displayName) { | |||||||
| return view.extend({ | return view.extend({ | ||||||
| 	load: function() { | 	load: function() { | ||||||
| 		return Promise.all([ | 		return Promise.all([ | ||||||
| 			uci.load('tailscale'), | 			uci.load('tailscale') | ||||||
| 			getServiceStatus() |  | ||||||
| 		]); | 		]); | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
| @@ -89,8 +87,25 @@ return view.extend({ | |||||||
| 		s = m.section(form.TypedSection); | 		s = m.section(form.TypedSection); | ||||||
| 		s.anonymous = true; | 		s.anonymous = true; | ||||||
| 		s.render = function () { | 		s.render = function () { | ||||||
|  | 			poll.add(function() { | ||||||
|  | 				return Promise.resolve(getStatus()).then(function(res) { | ||||||
|  | 					var service_view = document.getElementById("service_status"); | ||||||
|  | 					var login_view = document.getElementById("login_status_div"); | ||||||
|  | 					service_view.innerHTML = renderStatus(res.isRunning);	 | ||||||
|  | 					login_view.innerHTML = renderLogin(res.backendState, res.authURL, res.displayName); | ||||||
|  | 					var logoutButton = document.getElementById('logout_button'); | ||||||
|  | 					if (logoutButton) { | ||||||
|  | 						logoutButton.onclick = function() { | ||||||
|  | 							if (confirm(_('Are you sure you want to logout and unbind the current device?'))) { | ||||||
|  | 								fs.exec("/usr/sbin/tailscale", ["logout"]); | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				}); | ||||||
|  | 			}); | ||||||
|  | 	 | ||||||
| 			return E('div', { class: 'cbi-section', id: 'status_bar' }, [ | 			return E('div', { class: 'cbi-section', id: 'status_bar' }, [ | ||||||
| 					E('p', { id: 'service_status' }, renderStatus(isRunning)) | 					E('p', { id: 'service_status' }, _('Collecting data ...')) | ||||||
| 			]); | 			]); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| @@ -104,20 +119,6 @@ return view.extend({ | |||||||
| 		o = s.option(form.DummyValue, 'login_status', _('Login Status')); | 		o = s.option(form.DummyValue, 'login_status', _('Login Status')); | ||||||
| 		o.depends('enabled', '1'); | 		o.depends('enabled', '1'); | ||||||
| 		o.renderWidget = function(section_id, option_id) { | 		o.renderWidget = function(section_id, option_id) { | ||||||
| 			poll.add(function() { |  | ||||||
| 				return Promise.resolve(getLoginStatus()).then(function(res) { |  | ||||||
| 					document.getElementById('login_status_div').innerHTML = renderLogin(res.backendState, res.authURL, res.displayName); |  | ||||||
| 					var logoutButton = document.getElementById('logout_button'); |  | ||||||
| 					if (logoutButton) { |  | ||||||
| 						logoutButton.onclick = function() { |  | ||||||
| 							if (confirm(_('Are you sure you want to logout and unbind the current device?'))) { |  | ||||||
| 								fs.exec("/usr/sbin/tailscale", ["logout"]); |  | ||||||
| 							} |  | ||||||
| 						} |  | ||||||
| 					} |  | ||||||
| 				}); |  | ||||||
| 			}); |  | ||||||
|  |  | ||||||
| 			return E('div', { 'id': 'login_status_div' }, _('Collecting data ...')); | 			return E('div', { 'id': 'login_status_div' }, _('Collecting data ...')); | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,15 +1,15 @@ | |||||||
| msgid "" | msgid "" | ||||||
| msgstr "Content-Type: text/plain; charset=UTF-8" | msgstr "Content-Type: text/plain; charset=UTF-8" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:158 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:159 | ||||||
| msgid "Accept DNS" | msgid "Accept DNS" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:158 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:159 | ||||||
| msgid "Accept DNS configuration from the Tailscale admin console." | msgid "Accept DNS configuration from the Tailscale admin console." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:150 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:151 | ||||||
| msgid "Accept subnet routes that other nodes advertise." | msgid "Accept subnet routes that other nodes advertise." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -17,11 +17,11 @@ msgstr "" | |||||||
| msgid "Access Control" | msgid "Access Control" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:148 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:149 | ||||||
| msgid "Advanced Settings" | msgid "Advanced Settings" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:113 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:99 | ||||||
| msgid "Are you sure you want to logout and unbind the current device?" | msgid "Are you sure you want to logout and unbind the current device?" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -29,15 +29,16 @@ msgstr "" | |||||||
| msgid "Auth Key" | msgid "Auth Key" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:150 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:151 | ||||||
| msgid "Auto Mesh" | msgid "Auto Mesh" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:98 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:113 | ||||||
| msgid "Basic Settings" | msgid "Basic Settings" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:121 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:108 | ||||||
|  | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:122 | ||||||
| msgid "Collecting data ..." | msgid "Collecting data ..." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -45,31 +46,31 @@ msgstr "" | |||||||
| msgid "Custom Server Settings" | msgid "Custom Server Settings" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:154 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:155 | ||||||
| msgid "Device Name" | msgid "Device Name" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:100 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:115 | ||||||
| msgid "Enable" | msgid "Enable" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:143 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:144 | ||||||
| msgid "Error Log" | msgid "Error Log" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:162 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:163 | ||||||
| msgid "Exit Node" | msgid "Exit Node" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:166 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:167 | ||||||
| msgid "Expose Subnets" | msgid "Expose Subnets" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:166 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:167 | ||||||
| msgid "Expose physical network routes onto Tailscale. e.g. 10.0.0.0/24" | msgid "Expose physical network routes onto Tailscale. e.g. 10.0.0.0/24" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:133 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:134 | ||||||
| msgid "Firewall Mode" | msgid "Firewall Mode" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -101,23 +102,23 @@ msgstr "" | |||||||
| msgid "LAN access Tailscale" | msgid "LAN access Tailscale" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:154 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:155 | ||||||
| msgid "Leave blank to use the device's hostname." | msgid "Leave blank to use the device's hostname." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:139 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:140 | ||||||
| msgid "Logging program activities." | msgid "Logging program activities." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:143 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:144 | ||||||
| msgid "Logging program errors and exceptions." | msgid "Logging program errors and exceptions." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:104 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:119 | ||||||
| msgid "Login Status" | msgid "Login Status" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:67 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:66 | ||||||
| msgid "Logout and Unbind" | msgid "Logout and Unbind" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -125,12 +126,12 @@ msgstr "" | |||||||
| msgid "MTU" | msgid "MTU" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:54 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:53 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:69 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:68 | ||||||
| msgid "NOT RUNNING" | msgid "NOT RUNNING" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:64 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:63 | ||||||
| msgid "Needs Login" | msgid "Needs Login" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -142,19 +143,19 @@ msgstr "" | |||||||
| msgid "No interface online." | msgid "No interface online." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:162 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:163 | ||||||
| msgid "Offer to be an exit node for outbound internet traffic from the Tailscale network." | msgid "Offer to be an exit node for outbound internet traffic from the Tailscale network." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:139 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:140 | ||||||
| msgid "Output Log" | msgid "Output Log" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:124 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:125 | ||||||
| msgid "Port" | msgid "Port" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:52 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:51 | ||||||
| msgid "RUNNING" | msgid "RUNNING" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -162,14 +163,14 @@ msgstr "" | |||||||
| msgid "Server Address" | msgid "Server Address" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:124 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:125 | ||||||
| msgid "Set the Tailscale port number." | msgid "Set the Tailscale port number." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:72 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:72 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:52 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:51 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:54 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:53 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:87 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:85 | ||||||
| #: luci-app-tailscale/root/usr/share/luci/menu.d/luci-app-tailscale.json:3 | #: luci-app-tailscale/root/usr/share/luci/menu.d/luci-app-tailscale.json:3 | ||||||
| msgid "Tailscale" | msgid "Tailscale" | ||||||
| msgstr "" | msgstr "" | ||||||
| @@ -183,11 +184,11 @@ msgid "Tailscale access WAN" | |||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:73 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:73 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:87 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:85 | ||||||
| msgid "Tailscale is a cross-platform and easy to use virtual LAN." | msgid "Tailscale is a cross-platform and easy to use virtual LAN." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:129 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:130 | ||||||
| msgid "The working directory contains config files, audit logs, and runtime info." | msgid "The working directory contains config files, audit logs, and runtime info." | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| @@ -215,6 +216,6 @@ msgstr "" | |||||||
| msgid "WAN access Tailscale" | msgid "WAN access Tailscale" | ||||||
| msgstr "" | msgstr "" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:129 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:130 | ||||||
| msgid "Workdir" | msgid "Workdir" | ||||||
| msgstr "" | msgstr "" | ||||||
|   | |||||||
| @@ -7,15 +7,15 @@ msgstr "" | |||||||
| "MIME-Version: 1.0\n" | "MIME-Version: 1.0\n" | ||||||
| "Content-Transfer-Encoding: 8bit\n" | "Content-Transfer-Encoding: 8bit\n" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:158 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:159 | ||||||
| msgid "Accept DNS" | msgid "Accept DNS" | ||||||
| msgstr "允许DNS" | msgstr "允许DNS" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:158 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:159 | ||||||
| msgid "Accept DNS configuration from the Tailscale admin console." | msgid "Accept DNS configuration from the Tailscale admin console." | ||||||
| msgstr "使用 Tailscale 管理控制台的 DNS 配置。" | msgstr "使用 Tailscale 管理控制台的 DNS 配置。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:150 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:151 | ||||||
| msgid "Accept subnet routes that other nodes advertise." | msgid "Accept subnet routes that other nodes advertise." | ||||||
| msgstr "接受其他节点广播的子网路由。" | msgstr "接受其他节点广播的子网路由。" | ||||||
|  |  | ||||||
| @@ -23,11 +23,11 @@ msgstr "接受其他节点广播的子网路由。" | |||||||
| msgid "Access Control" | msgid "Access Control" | ||||||
| msgstr "访问控制" | msgstr "访问控制" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:148 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:149 | ||||||
| msgid "Advanced Settings" | msgid "Advanced Settings" | ||||||
| msgstr "高级设置" | msgstr "高级设置" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:113 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:99 | ||||||
| msgid "Are you sure you want to logout and unbind the current device?" | msgid "Are you sure you want to logout and unbind the current device?" | ||||||
| msgstr "是否注销当前登录并且解绑当前设备?" | msgstr "是否注销当前登录并且解绑当前设备?" | ||||||
|  |  | ||||||
| @@ -35,15 +35,16 @@ msgstr "是否注销当前登录并且解绑当前设备?" | |||||||
| msgid "Auth Key" | msgid "Auth Key" | ||||||
| msgstr "认证密钥" | msgstr "认证密钥" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:150 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:151 | ||||||
| msgid "Auto Mesh" | msgid "Auto Mesh" | ||||||
| msgstr "自动组网" | msgstr "自动组网" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:98 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:113 | ||||||
| msgid "Basic Settings" | msgid "Basic Settings" | ||||||
| msgstr "基础设置" | msgstr "基础设置" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:121 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:108 | ||||||
|  | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:122 | ||||||
| msgid "Collecting data ..." | msgid "Collecting data ..." | ||||||
| msgstr "正在收集数据..." | msgstr "正在收集数据..." | ||||||
|  |  | ||||||
| @@ -51,31 +52,31 @@ msgstr "正在收集数据..." | |||||||
| msgid "Custom Server Settings" | msgid "Custom Server Settings" | ||||||
| msgstr "自定义服务器" | msgstr "自定义服务器" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:154 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:155 | ||||||
| msgid "Device Name" | msgid "Device Name" | ||||||
| msgstr "设备名称" | msgstr "设备名称" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:100 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:115 | ||||||
| msgid "Enable" | msgid "Enable" | ||||||
| msgstr "启用" | msgstr "启用" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:143 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:144 | ||||||
| msgid "Error Log" | msgid "Error Log" | ||||||
| msgstr "错误日志" | msgstr "错误日志" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:162 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:163 | ||||||
| msgid "Exit Node" | msgid "Exit Node" | ||||||
| msgstr "出口节点" | msgstr "出口节点" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:166 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:167 | ||||||
| msgid "Expose Subnets" | msgid "Expose Subnets" | ||||||
| msgstr "公开网段" | msgstr "公开网段" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:166 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:167 | ||||||
| msgid "Expose physical network routes onto Tailscale. e.g. 10.0.0.0/24" | msgid "Expose physical network routes onto Tailscale. e.g. 10.0.0.0/24" | ||||||
| msgstr "广播子网路由至 Tailscale。例如:10.0.0.0/24" | msgstr "广播子网路由至 Tailscale。例如:10.0.0.0/24" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:133 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:134 | ||||||
| msgid "Firewall Mode" | msgid "Firewall Mode" | ||||||
| msgstr "防火墙模式" | msgstr "防火墙模式" | ||||||
|  |  | ||||||
| @@ -107,23 +108,23 @@ msgstr "接口名称" | |||||||
| msgid "LAN access Tailscale" | msgid "LAN access Tailscale" | ||||||
| msgstr "本地局域网访问虚拟局域网" | msgstr "本地局域网访问虚拟局域网" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:154 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:155 | ||||||
| msgid "Leave blank to use the device's hostname." | msgid "Leave blank to use the device's hostname." | ||||||
| msgstr "留空以使用设备的主机名。" | msgstr "留空以使用设备的主机名。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:139 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:140 | ||||||
| msgid "Logging program activities." | msgid "Logging program activities." | ||||||
| msgstr "记录程序运行信息。" | msgstr "记录程序运行信息。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:143 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:144 | ||||||
| msgid "Logging program errors and exceptions." | msgid "Logging program errors and exceptions." | ||||||
| msgstr "记录程序错误和异常信息。" | msgstr "记录程序错误和异常信息。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:104 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:119 | ||||||
| msgid "Login Status" | msgid "Login Status" | ||||||
| msgstr "已绑定用户" | msgstr "已绑定用户" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:67 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:66 | ||||||
| msgid "Logout and Unbind" | msgid "Logout and Unbind" | ||||||
| msgstr "注销登录并解除绑定" | msgstr "注销登录并解除绑定" | ||||||
|  |  | ||||||
| @@ -131,12 +132,12 @@ msgstr "注销登录并解除绑定" | |||||||
| msgid "MTU" | msgid "MTU" | ||||||
| msgstr "MTU" | msgstr "MTU" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:54 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:53 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:69 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:68 | ||||||
| msgid "NOT RUNNING" | msgid "NOT RUNNING" | ||||||
| msgstr "未运行" | msgstr "未运行" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:64 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:63 | ||||||
| msgid "Needs Login" | msgid "Needs Login" | ||||||
| msgstr "未登录" | msgstr "未登录" | ||||||
|  |  | ||||||
| @@ -148,19 +149,19 @@ msgstr "网络接口信息" | |||||||
| msgid "No interface online." | msgid "No interface online." | ||||||
| msgstr "无在线接口。" | msgstr "无在线接口。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:162 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:163 | ||||||
| msgid "Offer to be an exit node for outbound internet traffic from the Tailscale network." | msgid "Offer to be an exit node for outbound internet traffic from the Tailscale network." | ||||||
| msgstr "作为 Tailscale 广域网出口节点。" | msgstr "作为 Tailscale 广域网出口节点。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:139 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:140 | ||||||
| msgid "Output Log" | msgid "Output Log" | ||||||
| msgstr "运行日志" | msgstr "运行日志" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:124 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:125 | ||||||
| msgid "Port" | msgid "Port" | ||||||
| msgstr "端口" | msgstr "端口" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:52 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:51 | ||||||
| msgid "RUNNING" | msgid "RUNNING" | ||||||
| msgstr "运行中" | msgstr "运行中" | ||||||
|  |  | ||||||
| @@ -168,14 +169,14 @@ msgstr "运行中" | |||||||
| msgid "Server Address" | msgid "Server Address" | ||||||
| msgstr "服务器地址" | msgstr "服务器地址" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:124 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:125 | ||||||
| msgid "Set the Tailscale port number." | msgid "Set the Tailscale port number." | ||||||
| msgstr "设置 Tailscale 端口号。" | msgstr "设置 Tailscale 端口号。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:72 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:72 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:52 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:51 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:54 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:53 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:87 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:85 | ||||||
| #: luci-app-tailscale/root/usr/share/luci/menu.d/luci-app-tailscale.json:3 | #: luci-app-tailscale/root/usr/share/luci/menu.d/luci-app-tailscale.json:3 | ||||||
| msgid "Tailscale" | msgid "Tailscale" | ||||||
| msgstr "Tailscale" | msgstr "Tailscale" | ||||||
| @@ -189,11 +190,11 @@ msgid "Tailscale access WAN" | |||||||
| msgstr "虚拟局域网访问本地广域网" | msgstr "虚拟局域网访问本地广域网" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:73 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:73 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:87 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:85 | ||||||
| msgid "Tailscale is a cross-platform and easy to use virtual LAN." | msgid "Tailscale is a cross-platform and easy to use virtual LAN." | ||||||
| msgstr "Tailscale 是一个跨平台且易于使用的虚拟局域网 VPN。" | msgstr "Tailscale 是一个跨平台且易于使用的虚拟局域网 VPN。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:129 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:130 | ||||||
| msgid "The working directory contains config files, audit logs, and runtime info." | msgid "The working directory contains config files, audit logs, and runtime info." | ||||||
| msgstr "工作目录包含配置文件、审计日志和运行时信息。" | msgstr "工作目录包含配置文件、审计日志和运行时信息。" | ||||||
|  |  | ||||||
| @@ -221,6 +222,6 @@ msgstr "使用 %s 部署私有服务器" | |||||||
| msgid "WAN access Tailscale" | msgid "WAN access Tailscale" | ||||||
| msgstr "本地广域网访问虚拟局域网" | msgstr "本地广域网访问虚拟局域网" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:129 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:130 | ||||||
| msgid "Workdir" | msgid "Workdir" | ||||||
| msgstr "工作目录" | msgstr "工作目录" | ||||||
|   | |||||||
| @@ -7,15 +7,15 @@ msgstr "" | |||||||
| "MIME-Version: 1.0\n" | "MIME-Version: 1.0\n" | ||||||
| "Content-Transfer-Encoding: 8bit\n" | "Content-Transfer-Encoding: 8bit\n" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:158 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:159 | ||||||
| msgid "Accept DNS" | msgid "Accept DNS" | ||||||
| msgstr "允許DNS" | msgstr "允許DNS" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:158 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:159 | ||||||
| msgid "Accept DNS configuration from the Tailscale admin console." | msgid "Accept DNS configuration from the Tailscale admin console." | ||||||
| msgstr "使用 Tailscale 管理控制台的DNS配置。" | msgstr "使用 Tailscale 管理控制台的DNS配置。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:150 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:151 | ||||||
| msgid "Accept subnet routes that other nodes advertise." | msgid "Accept subnet routes that other nodes advertise." | ||||||
| msgstr "接受其他節點廣播的子網路由。" | msgstr "接受其他節點廣播的子網路由。" | ||||||
|  |  | ||||||
| @@ -23,11 +23,11 @@ msgstr "接受其他節點廣播的子網路由。" | |||||||
| msgid "Access Control" | msgid "Access Control" | ||||||
| msgstr "訪問控制" | msgstr "訪問控制" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:148 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:149 | ||||||
| msgid "Advanced Settings" | msgid "Advanced Settings" | ||||||
| msgstr "高級設置" | msgstr "高級設置" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:113 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:99 | ||||||
| msgid "Are you sure you want to logout and unbind the current device?" | msgid "Are you sure you want to logout and unbind the current device?" | ||||||
| msgstr "是否註銷當前登錄並且解綁當前設備?" | msgstr "是否註銷當前登錄並且解綁當前設備?" | ||||||
|  |  | ||||||
| @@ -35,15 +35,16 @@ msgstr "是否註銷當前登錄並且解綁當前設備?" | |||||||
| msgid "Auth Key" | msgid "Auth Key" | ||||||
| msgstr "認證密鑰" | msgstr "認證密鑰" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:150 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:151 | ||||||
| msgid "Auto Mesh" | msgid "Auto Mesh" | ||||||
| msgstr "自動組網" | msgstr "自動組網" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:98 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:113 | ||||||
| msgid "Basic Settings" | msgid "Basic Settings" | ||||||
| msgstr "基礎設置" | msgstr "基礎設置" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:121 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:108 | ||||||
|  | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:122 | ||||||
| msgid "Collecting data ..." | msgid "Collecting data ..." | ||||||
| msgstr "正在收集數據..." | msgstr "正在收集數據..." | ||||||
|  |  | ||||||
| @@ -51,31 +52,31 @@ msgstr "正在收集數據..." | |||||||
| msgid "Custom Server Settings" | msgid "Custom Server Settings" | ||||||
| msgstr "自定義服務器" | msgstr "自定義服務器" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:154 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:155 | ||||||
| msgid "Device Name" | msgid "Device Name" | ||||||
| msgstr "設備名稱" | msgstr "設備名稱" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:100 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:115 | ||||||
| msgid "Enable" | msgid "Enable" | ||||||
| msgstr "啟用" | msgstr "啟用" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:143 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:144 | ||||||
| msgid "Error Log" | msgid "Error Log" | ||||||
| msgstr "錯誤日誌" | msgstr "錯誤日誌" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:162 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:163 | ||||||
| msgid "Exit Node" | msgid "Exit Node" | ||||||
| msgstr "出口節點" | msgstr "出口節點" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:166 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:167 | ||||||
| msgid "Expose Subnets" | msgid "Expose Subnets" | ||||||
| msgstr "公開網段" | msgstr "公開網段" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:166 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:167 | ||||||
| msgid "Expose physical network routes onto Tailscale. e.g. 10.0.0.0/24" | msgid "Expose physical network routes onto Tailscale. e.g. 10.0.0.0/24" | ||||||
| msgstr "廣播子網路由至 Tailscale。例如:10.0.0.0/24" | msgstr "廣播子網路由至 Tailscale。例如:10.0.0.0/24" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:133 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:134 | ||||||
| msgid "Firewall Mode" | msgid "Firewall Mode" | ||||||
| msgstr "防火牆模式" | msgstr "防火牆模式" | ||||||
|  |  | ||||||
| @@ -107,23 +108,23 @@ msgstr "接口名稱" | |||||||
| msgid "LAN access Tailscale" | msgid "LAN access Tailscale" | ||||||
| msgstr "本地局域網訪問虛擬局域網" | msgstr "本地局域網訪問虛擬局域網" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:154 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:155 | ||||||
| msgid "Leave blank to use the device's hostname." | msgid "Leave blank to use the device's hostname." | ||||||
| msgstr "留空以使用設備的主機名。" | msgstr "留空以使用設備的主機名。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:139 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:140 | ||||||
| msgid "Logging program activities." | msgid "Logging program activities." | ||||||
| msgstr "記錄程序運行信息。" | msgstr "記錄程序運行信息。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:143 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:144 | ||||||
| msgid "Logging program errors and exceptions." | msgid "Logging program errors and exceptions." | ||||||
| msgstr "記錄程序錯誤和異常信息。" | msgstr "記錄程序錯誤和異常信息。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:104 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:119 | ||||||
| msgid "Login Status" | msgid "Login Status" | ||||||
| msgstr "已綁定用戶" | msgstr "已綁定用戶" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:67 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:66 | ||||||
| msgid "Logout and Unbind" | msgid "Logout and Unbind" | ||||||
| msgstr "註銷登錄並解除綁定" | msgstr "註銷登錄並解除綁定" | ||||||
|  |  | ||||||
| @@ -131,12 +132,12 @@ msgstr "註銷登錄並解除綁定" | |||||||
| msgid "MTU" | msgid "MTU" | ||||||
| msgstr "MTU" | msgstr "MTU" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:54 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:53 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:69 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:68 | ||||||
| msgid "NOT RUNNING" | msgid "NOT RUNNING" | ||||||
| msgstr "未運行" | msgstr "未運行" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:64 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:63 | ||||||
| msgid "Needs Login" | msgid "Needs Login" | ||||||
| msgstr "未登錄" | msgstr "未登錄" | ||||||
|  |  | ||||||
| @@ -148,19 +149,19 @@ msgstr "網絡接口信息" | |||||||
| msgid "No interface online." | msgid "No interface online." | ||||||
| msgstr "無在線接口。" | msgstr "無在線接口。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:162 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:163 | ||||||
| msgid "Offer to be an exit node for outbound internet traffic from the Tailscale network." | msgid "Offer to be an exit node for outbound internet traffic from the Tailscale network." | ||||||
| msgstr "作為 Tailscale 廣域網出口節點。" | msgstr "作為 Tailscale 廣域網出口節點。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:139 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:140 | ||||||
| msgid "Output Log" | msgid "Output Log" | ||||||
| msgstr "運行日誌" | msgstr "運行日誌" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:124 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:125 | ||||||
| msgid "Port" | msgid "Port" | ||||||
| msgstr "端口" | msgstr "端口" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:52 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:51 | ||||||
| msgid "RUNNING" | msgid "RUNNING" | ||||||
| msgstr "運行中" | msgstr "運行中" | ||||||
|  |  | ||||||
| @@ -168,14 +169,14 @@ msgstr "運行中" | |||||||
| msgid "Server Address" | msgid "Server Address" | ||||||
| msgstr "服務器地址" | msgstr "服務器地址" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:124 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:125 | ||||||
| msgid "Set the Tailscale port number." | msgid "Set the Tailscale port number." | ||||||
| msgstr "設置 Tailscale 端口號。" | msgstr "設置 Tailscale 端口號。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:72 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:72 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:52 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:51 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:54 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:53 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:87 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:85 | ||||||
| #: luci-app-tailscale/root/usr/share/luci/menu.d/luci-app-tailscale.json:3 | #: luci-app-tailscale/root/usr/share/luci/menu.d/luci-app-tailscale.json:3 | ||||||
| msgid "Tailscale" | msgid "Tailscale" | ||||||
| msgstr "Tailscale" | msgstr "Tailscale" | ||||||
| @@ -189,11 +190,11 @@ msgid "Tailscale access WAN" | |||||||
| msgstr "虛擬局域網訪問本地廣域網" | msgstr "虛擬局域網訪問本地廣域網" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:73 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/interface.js:73 | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:87 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:85 | ||||||
| msgid "Tailscale is a cross-platform and easy to use virtual LAN." | msgid "Tailscale is a cross-platform and easy to use virtual LAN." | ||||||
| msgstr "Tailscale 是一個跨平臺且易於使用的虛擬局域網 VPN。" | msgstr "Tailscale 是一個跨平臺且易於使用的虛擬局域網 VPN。" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:129 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:130 | ||||||
| msgid "The working directory contains config files, audit logs, and runtime info." | msgid "The working directory contains config files, audit logs, and runtime info." | ||||||
| msgstr "工作目錄包含配置文件、審計日誌和運行時信息。" | msgstr "工作目錄包含配置文件、審計日誌和運行時信息。" | ||||||
|  |  | ||||||
| @@ -221,6 +222,6 @@ msgstr "使用 %s 部署私有服務器" | |||||||
| msgid "WAN access Tailscale" | msgid "WAN access Tailscale" | ||||||
| msgstr "本地廣域網訪問虛擬局域網" | msgstr "本地廣域網訪問虛擬局域網" | ||||||
|  |  | ||||||
| #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:129 | #: luci-app-tailscale/htdocs/luci-static/resources/view/tailscale/setting.js:130 | ||||||
| msgid "Workdir" | msgid "Workdir" | ||||||
| msgstr "工作目錄" | msgstr "工作目錄" | ||||||
|   | |||||||
| @@ -55,41 +55,43 @@ custom_instance() { | |||||||
| 		[ -f "/var/run/tailscale.wait.pid" ] && return | 		[ -f "/var/run/tailscale.wait.pid" ] && return | ||||||
| 		touch /var/run/tailscale.wait.pid | 		touch /var/run/tailscale.wait.pid | ||||||
| 		count=0 | 		count=0 | ||||||
| 		while [ -z "$(ifconfig | grep 'tailscale' | awk '{print $1}')" ] | 		while [ -z "$(ifconfig | grep 'tailscale' | awk '{print $1}')" ] || [ -z "$(tailscale ip -4)" ] | ||||||
| 		do | 		do | ||||||
| 			sleep 2 | 			sleep 2 | ||||||
| 			let count++ | 			let count++ | ||||||
| 			[ "${count}" -ge 5 ] && { rm /var/run/tailscale.wait.pid; exit 19; } | 			[ "${count}" -ge 5 ] && { rm /var/run/tailscale.wait.pid; exit 19; } | ||||||
| 		done | 		done | ||||||
| 		ts0=$(ifconfig | grep 'tailscale' | awk '{print $1}') | 		ts0=$(ifconfig | grep 'tailscale' | awk '{print $1}') | ||||||
| 		for i in ${ts0} | 		if [ -z "$(uci -q get network.tailscale)" ];  then				 | ||||||
| 		do | 			uci set network.tailscale='interface' | ||||||
| 			echo "tailscale interface $i is started!" | 			if [ "$ts0" = *$'\n'* ]; then | ||||||
| 			if [ -z "$(uci -q get network.$i)" ];  then | 				uci set network.ts_lan='device' | ||||||
| 				ts_ip=$(tailscale ip -4) | 				uci set network.ts_lan.type='bridge' | ||||||
| 				uci set network.$i=interface | 				uci set network.ts_lan.name='ts-lan' | ||||||
| 				uci set network.$i.proto='static' | 				for port in "${ts0}"; do | ||||||
| 				uci set network.$i.ipaddr=$ts_ip | 					uci add_list network.ts_lan.ports=$port | ||||||
| 				uci set network.$i.netmask='255.0.0.0' |  | ||||||
| 				uci set network.$i.device=$i |  | ||||||
| 			fi |  | ||||||
| 				done | 				done | ||||||
|  | 				uci set network.tailscale.proto='none' | ||||||
|  | 				uci set network.tailscale.device='ts-lan' | ||||||
|  | 			else | ||||||
|  | 				ts_ip=$(tailscale ip -4) | ||||||
|  | 				uci set network.tailscale.proto='static' | ||||||
|  | 				uci set network.tailscale.ipaddr=$ts_ip | ||||||
|  | 				uci set network.tailscale.netmask='255.0.0.0' | ||||||
|  | 				uci set network.tailscale.device=$ts0 | ||||||
|  | 			fi | ||||||
|  | 		fi | ||||||
|  |  | ||||||
| 		config_get_bool acceptRoutes $cfg 'acceptRoutes' | 		config_get_bool acceptRoutes $cfg 'acceptRoutes' | ||||||
| 		if [ "$acceptRoutes" == "1" ];  then | 		if [ "$acceptRoutes" == "1" ];  then | ||||||
| 			if [ -z "$(uci -q get firewall.tszone)" ];  then | 			if [ -z "$(uci -q get firewall.tszone)" ];  then | ||||||
| 				uci set firewall.tszone=zone | 				uci set firewall.tszone='zone' | ||||||
| 				uci set firewall.tszone.input='ACCEPT' | 				uci set firewall.tszone.input='ACCEPT' | ||||||
| 				uci set firewall.tszone.output='ACCEPT' | 				uci set firewall.tszone.output='ACCEPT' | ||||||
| 				uci set firewall.tszone.forward='REJECT' | 				uci set firewall.tszone.forward='REJECT' | ||||||
| 				uci set firewall.tszone.masq='1' | 				uci set firewall.tszone.masq='1' | ||||||
| 				uci set firewall.tszone.name='tailscale' | 				uci set firewall.tszone.name='tailscale' | ||||||
| 				if [ "$ts0" = *$'\n'* ]; then | 				uci set firewall.tszone.network='tailscale' | ||||||
| 					printf '%s\n' "$ts0" | IFS=$'\n' read -ra ts0_array |  | ||||||
| 					uci add_list firewall.tszone.network ${ts0_array[@]} |  | ||||||
| 				else |  | ||||||
| 					uci set firewall.tszone.network=$ts0 |  | ||||||
| 				fi |  | ||||||
| 			fi | 			fi | ||||||
| 		else | 		else | ||||||
| 			uci -q delete firewall.tszone | 			uci -q delete firewall.tszone | ||||||
| @@ -177,12 +179,9 @@ stop_instance() { | |||||||
| 	local cfg="$1" | 	local cfg="$1" | ||||||
| 	/usr/sbin/tailscaled --cleanup | 	/usr/sbin/tailscaled --cleanup | ||||||
|  |  | ||||||
| 	# Remove network interfaces | 	# Remove network settings | ||||||
| 	ts0="$(ifconfig | grep 'tailscale' | awk '{print $1}')" | 	uci -q delete network.tailscale | ||||||
| 	for i in ${ts0} | 	uci -q delete network.ts_lan | ||||||
| 	do |  | ||||||
| 		uci -q delete network.$i |  | ||||||
| 	done |  | ||||||
| 	 | 	 | ||||||
| 	# Remove firewall settings | 	# Remove firewall settings | ||||||
| 	uci -q delete firewall.tszone | 	uci -q delete firewall.tszone | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 asvow
					asvow