mirror of
https://github.com/unraid/webgui.git
synced 2026-05-03 16:29:45 -05:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -2413,7 +2413,7 @@ The system attempted to determine the correct port automatically. If it used the
|
||||
In most cases this port is all you will need to specify in order to Serve the website in this container, although additional options are available below for more complex containers.
|
||||
|
||||
This value is passed to the `<serve_port>` portion of this command which starts serve or funnel:<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> http://localhost:<serve_port><local_path>`<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> <serve_target>:<serve_port><local_path>`<br>
|
||||
For more details see the <a href="https://tailscale.com/kb/1242/tailscale-serve" target="_blank">Tailscale Serve Command Line</a> documentation.
|
||||
:end
|
||||
|
||||
@@ -2421,27 +2421,34 @@ For more details see the <a href="https://tailscale.com/kb/1242/tailscale-serve"
|
||||
Here there be dragons!
|
||||
:end
|
||||
|
||||
:docker_tailscale_serve_target_help:
|
||||
When not specified, this value defaults to http://localhost. It is passed to the `<serve_target>` portion of this command which starts serve or funnel:<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> <serve_target>:<serve_port><local_path>`<br>
|
||||
For more details see the <a href="https://tailscale.com/kb/1242/tailscale-serve" target="_blank">Tailscale Serve Command Line</a> documentation.<br>
|
||||
Please note that only `localhost` or `127.0.0.1` are supported.
|
||||
:end
|
||||
|
||||
:docker_tailscale_serve_local_path_help:
|
||||
When not specified, this value defaults to an empty string. It is passed to the `<local_path>` portion of this command which starts serve or funnel:<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> http://localhost:<serve_port><local_path>`<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> <serve_target>:<serve_port><local_path>`<br>
|
||||
For more details see the <a href="https://tailscale.com/kb/1242/tailscale-serve" target="_blank">Tailscale Serve Command Line</a> documentation.
|
||||
:end
|
||||
|
||||
:docker_tailscale_serve_protocol_help:
|
||||
When not specified, this value defaults to "https". It is passed to the `<protocol>` portion of this command which starts serve or funnel:<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol>=<protocol_port><path> http://localhost:<serve_port><local_path>`<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol>=<protocol_port><path> <serve_target>:<serve_port><local_path>`<br>
|
||||
For more details see the <a href="https://tailscale.com/kb/1242/tailscale-serve" target="_blank">Tailscale Serve Command Line</a> documentation.
|
||||
:end
|
||||
|
||||
:docker_tailscale_serve_protocol_port_help:
|
||||
When not specified, this value defaults to "=443". It is passed to the `<protocol_port>` portion of this command which starts serve or funnel:<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> http://localhost:<serve_port><local_path>`<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> <serve_target>:<serve_port><local_path>`<br>
|
||||
For more details see the <a href="https://tailscale.com/kb/1242/tailscale-serve" target="_blank">Tailscale Serve Command Line</a> documentation.
|
||||
:end
|
||||
|
||||
:docker_tailscale_serve_path_help:
|
||||
When not specified, this value defaults to an empty string. It is passed to the `<path>` portion of this command which starts serve or funnel:<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> http://localhost:<serve_port><local_path>`<br>
|
||||
`tailscale [serve|funnel] --bg --<protocol><protocol_port><path> <serve_target>:<serve_port><local_path>`<br>
|
||||
For more details see the <a href="https://tailscale.com/kb/1242/tailscale-serve" target="_blank">Tailscale Serve Command Line</a> documentation.
|
||||
:end
|
||||
|
||||
|
||||
@@ -1301,6 +1301,14 @@ _(Tailscale Show Advanced Settings)_:
|
||||
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="TSservetarget noshow">
|
||||
_(Tailscale Serve Target)_:
|
||||
: <input type="text" name="TSservetarget" <?php if (!empty($xml['TailscaleServeTarget'])) echo 'value="' . $xml['TailscaleServeTarget'] . '"'; ?> placeholder="_(Leave empty if unsure)_">
|
||||
|
||||
:docker_tailscale_serve_target_help:
|
||||
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="TSservelocalpath noshow">
|
||||
_(Tailscale Serve Local Path)_:
|
||||
: <input type="text" name="TSservelocalpath" <?php if (!empty($xml['TailscaleServeLocalPath'])) echo 'value="' . $xml['TailscaleServeLocalPath'] . '"'; ?> placeholder="_(Leave empty if unsure)_">
|
||||
@@ -1679,6 +1687,7 @@ function showTSAdvanced(checked) {
|
||||
$('.TSservepath').hide();
|
||||
$('.TSserveprotocol').hide();
|
||||
$('.TSserveprotocolport').hide();
|
||||
$('.TSservetarget').hide();
|
||||
$('.TSservelocalpath').hide();
|
||||
$('.TSwebui').hide();
|
||||
$('.TStroubleshooting').hide();
|
||||
@@ -1692,6 +1701,7 @@ function showTSAdvanced(checked) {
|
||||
$('.TSservepath').show();
|
||||
$('.TSserveprotocol').show();
|
||||
$('.TSserveprotocolport').show();
|
||||
$('.TSservetarget').show();
|
||||
$('.TSservelocalpath').show();
|
||||
$('.TSwebui').show();
|
||||
$('.TStroubleshooting').show();
|
||||
|
||||
@@ -117,6 +117,7 @@ function postToXML($post, $setOwnership=false) {
|
||||
$xml->TailscaleWebUI = xml_encode(generateTSwebui($post['TSwebui'], $post['TSserve'], $post['contWebUI']));
|
||||
if (isset($post['TSserve']) && strtolower($post['TSserve']) !== 'no') {
|
||||
$xml->TailscaleServePort = xml_encode($post['TSserveport']);
|
||||
$xml->TailscaleServeTarget = xml_encode($post['TSservetarget']);
|
||||
$xml->TailscaleServeLocalPath = xml_encode($post['TSservelocalpath']);
|
||||
$xml->TailscaleServeProtocol = xml_encode($post['TSserveprotocol']);
|
||||
$xml->TailscaleServeProtocolPort = xml_encode($post['TSserveprotocolport']);
|
||||
@@ -171,6 +172,7 @@ function xmlToVar($xml) {
|
||||
$out['TailscaleUserspaceNetworking'] = xml_decode($xml->TailscaleUserspaceNetworking ?? '');
|
||||
$out['TailscaleServe'] = xml_decode($xml->TailscaleServe ?? '');
|
||||
$out['TailscaleServePort'] = xml_decode($xml->TailscaleServePort ?? '');
|
||||
$out['TailscaleServeTarget'] = xml_decode($xml->TailscaleServeTarget ?? '');
|
||||
$out['TailscaleServeLocalPath'] = xml_decode($xml->TailscaleServeLocalPath ?? '');
|
||||
$out['TailscaleServeProtocol'] = xml_decode($xml->TailscaleServeProtocol ?? '');
|
||||
$out['TailscaleServeProtocolPort'] = xml_decode($xml->TailscaleServeProtocolPort ?? '');
|
||||
@@ -364,6 +366,7 @@ function xmlToCommand($xml, $create_paths=false) {
|
||||
$TS_state_dir = '';
|
||||
$TS_serve_funnel = '';
|
||||
$TS_serve_port = '';
|
||||
$TS_serve_target = '';
|
||||
$TS_serve_local_path = '';
|
||||
$TS_serve_protocol = '';
|
||||
$TS_serve_protocol_port = '';
|
||||
@@ -397,6 +400,7 @@ function xmlToCommand($xml, $create_paths=false) {
|
||||
}
|
||||
$TS_serve_funnel = ($xml['TailscaleServe'] == 'funnel') ? '-e TAILSCALE_FUNNEL=true' : '';
|
||||
$TS_serve_port = !empty($xml['TailscaleServePort']) ? '-e TAILSCALE_SERVE_PORT=' . escapeshellarg($xml['TailscaleServePort']) : '';
|
||||
$TS_serve_target = !empty($xml['TailscaleServeTarget']) ? '-e TAILSCALE_SERVE_TARGET=' . escapeshellarg($xml['TailscaleServeTarget']) : '';
|
||||
$TS_serve_local_path = !empty($xml['TailscaleServeLocalPath']) ? '-e TAILSCALE_SERVE_LOCALPATH=' . escapeshellarg($xml['TailscaleServeLocalPath']) : '';
|
||||
$TS_serve_protocol = !empty($xml['TailscaleServeProtocol']) ? '-e TAILSCALE_SERVE_PROTOCOL=' . escapeshellarg($xml['TailscaleServeProtocol']) : '';
|
||||
$TS_serve_protocol_port = !empty($xml['TailscaleServeProtocolPort']) ? '-e TAILSCALE_SERVE_PROTOCOL_PORT=' . escapeshellarg($xml['TailscaleServeProtocolPort']) : '';
|
||||
@@ -474,8 +478,8 @@ function xmlToCommand($xml, $create_paths=false) {
|
||||
$pid_limit = "";
|
||||
}
|
||||
|
||||
$cmd = sprintf($docroot.'/plugins/dynamix.docker.manager/scripts/docker create %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s',
|
||||
$cmdName, $TS_entrypoint, $cmdNetwork, $cmdMyIP, $cmdCPUset, $pid_limit, $cmdPrivileged, implode(' -e ', $Variables), $TS_hostname, $TS_exitnode, $TS_exitnode_ip, $TS_lan_access, $TS_routes, $TS_accept_routes, $TS_ssh, $TS_userspace_networking, $TS_serve_funnel, $TS_serve_port, $TS_serve_local_path, $TS_serve_protocol, $TS_serve_protocol_port, $TS_serve_path, $TS_daemon_params, $TS_extra_params, $TS_state_dir, $TS_troubleshooting, $TS_postargs, implode(' -l ', $Labels), $TS_web_ui, $TS_hostname_label, implode(' -p ', $Ports), implode(' -v ', $Volumes), $TS_hook, $TS_cap, $TS_tundev, implode(' --device=', $Devices), $xml['ExtraParams'], escapeshellarg($xml['Repository']), $xml['PostArgs']);
|
||||
$cmd = sprintf($docroot.'/plugins/dynamix.docker.manager/scripts/docker create %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s',
|
||||
$cmdName, $TS_entrypoint, $cmdNetwork, $cmdMyIP, $cmdCPUset, $pid_limit, $cmdPrivileged, implode(' -e ', $Variables), $TS_hostname, $TS_exitnode, $TS_exitnode_ip, $TS_lan_access, $TS_routes, $TS_accept_routes, $TS_ssh, $TS_userspace_networking, $TS_serve_funnel, $TS_serve_port, $TS_serve_target, $TS_serve_local_path, $TS_serve_protocol, $TS_serve_protocol_port, $TS_serve_path, $TS_daemon_params, $TS_extra_params, $TS_state_dir, $TS_troubleshooting, $TS_postargs, implode(' -l ', $Labels), $TS_web_ui, $TS_hostname_label, implode(' -p ', $Ports), implode(' -v ', $Volumes), $TS_hook, $TS_cap, $TS_tundev, implode(' --device=', $Devices), $xml['ExtraParams'], escapeshellarg($xml['Repository']), $xml['PostArgs']);
|
||||
return [preg_replace('/\s\s+/', ' ', $cmd), $xml['Name'], $xml['Repository']];
|
||||
}
|
||||
function stopContainer($name, $t=false, $echo=true) {
|
||||
|
||||
@@ -17,7 +17,7 @@ Tag="share-alt-square"
|
||||
<?
|
||||
if (!empty($name) && !array_key_exists($name, $shares)) {
|
||||
echo "<script>done()</script>";
|
||||
return;
|
||||
exit;
|
||||
}
|
||||
$width = [123,300];
|
||||
|
||||
|
||||
@@ -361,12 +361,15 @@ if [ ! -z "${TAILSCALE_SERVE_PORT}" ]; then
|
||||
if [ -z "${TAILSCALE_SERVE_PROTOCOL_PORT}" ]; then
|
||||
TAILSCALE_SERVE_PROTOCOL_PORT="=443"
|
||||
fi
|
||||
if [ -z "${TAILSCALE_SERVE_TARGET}" ]; then
|
||||
TAILSCALE_SERVE_TARGET="http://localhost"
|
||||
fi
|
||||
if [ "${TAILSCALE_FUNNEL}" = "true" ]; then
|
||||
echo "Enabling Funnel! See https://tailscale.com/kb/1223/funnel"
|
||||
eval tailscale funnel --bg --"${TAILSCALE_SERVE_PROTOCOL}"${TAILSCALE_SERVE_PROTOCOL_PORT}${TAILSCALE_SERVE_PATH} http://localhost:"${TAILSCALE_SERVE_PORT}${TAILSCALE_SERVE_LOCALPATH}" | grep -v "To disable the proxy"
|
||||
eval tailscale funnel --bg --"${TAILSCALE_SERVE_PROTOCOL}"${TAILSCALE_SERVE_PROTOCOL_PORT}${TAILSCALE_SERVE_PATH} ${TAILSCALE_SERVE_TARGET}:"${TAILSCALE_SERVE_PORT}${TAILSCALE_SERVE_LOCALPATH}" | grep -v "To disable the proxy"
|
||||
else
|
||||
echo "Enabling Serve! See https://tailscale.com/kb/1312/serve"
|
||||
eval tailscale serve --bg --"${TAILSCALE_SERVE_PROTOCOL}"${TAILSCALE_SERVE_PROTOCOL_PORT}${TAILSCALE_SERVE_PATH} http://localhost:"${TAILSCALE_SERVE_PORT}${TAILSCALE_SERVE_LOCALPATH}" | grep -v "To disable the proxy"
|
||||
eval tailscale serve --bg --"${TAILSCALE_SERVE_PROTOCOL}"${TAILSCALE_SERVE_PROTOCOL_PORT}${TAILSCALE_SERVE_PATH} ${TAILSCALE_SERVE_TARGET}:"${TAILSCALE_SERVE_PORT}${TAILSCALE_SERVE_LOCALPATH}" | grep -v "To disable the proxy"
|
||||
fi
|
||||
if [ "${TAILSCALE_SERVE_PROTOCOL}" = "https" ]; then
|
||||
TS_DNSNAME="$(tailscale status --json | jq -r '.Self.DNSName' | sed 's/\.$//')"
|
||||
|
||||
Reference in New Issue
Block a user