Wordpress site in the Tor network
This commit is contained in:
parent
a8fe4e6aab
commit
dab6e10881
9 changed files with 50 additions and 38 deletions
|
@ -109,12 +109,9 @@ void VpnConfigurator::updateContainerConfigAfterInstallation(DockerContainer con
|
||||||
|
|
||||||
qDebug() << "amnezia-tor onions" << stdOut;
|
qDebug() << "amnezia-tor onions" << stdOut;
|
||||||
|
|
||||||
QStringList l = stdOut.split(",");
|
QString onion = stdOut;
|
||||||
for (QString s : l) {
|
onion.replace("\n", "");
|
||||||
if (s.contains(":80")) {
|
protocol.insert(config_key::site, onion);
|
||||||
protocol.insert(config_key::site, s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
containerConfig.insert(ProtocolProps::protoToString(mainProto), protocol);
|
containerConfig.insert(ProtocolProps::protoToString(mainProto), protocol);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ QMap<DockerContainer, QString> ContainerProps::containerHumanNames()
|
||||||
{DockerContainer::WireGuard, "WireGuard"},
|
{DockerContainer::WireGuard, "WireGuard"},
|
||||||
{DockerContainer::Ipsec, QObject::tr("IPsec")},
|
{DockerContainer::Ipsec, QObject::tr("IPsec")},
|
||||||
|
|
||||||
{DockerContainer::TorWebSite, QObject::tr("Web site in TOR network")},
|
{DockerContainer::TorWebSite, QObject::tr("Web site in Tor network")},
|
||||||
{DockerContainer::Dns, QObject::tr("DNS Service")},
|
{DockerContainer::Dns, QObject::tr("DNS Service")},
|
||||||
//{DockerContainer::FileShare, QObject::tr("SMB file sharing service")},
|
//{DockerContainer::FileShare, QObject::tr("SMB file sharing service")},
|
||||||
{DockerContainer::Sftp, QObject::tr("Sftp file sharing service")}
|
{DockerContainer::Sftp, QObject::tr("Sftp file sharing service")}
|
||||||
|
@ -94,7 +94,7 @@ QMap<DockerContainer, QString> ContainerProps::containerDescriptions()
|
||||||
{DockerContainer::WireGuard, QObject::tr("WireGuard container")},
|
{DockerContainer::WireGuard, QObject::tr("WireGuard container")},
|
||||||
{DockerContainer::Ipsec, QObject::tr("IPsec container")},
|
{DockerContainer::Ipsec, QObject::tr("IPsec container")},
|
||||||
|
|
||||||
{DockerContainer::TorWebSite, QObject::tr("Web site in TOR network")},
|
{DockerContainer::TorWebSite, QObject::tr("Web site in Tor network")},
|
||||||
{DockerContainer::Dns, QObject::tr("DNS Service")},
|
{DockerContainer::Dns, QObject::tr("DNS Service")},
|
||||||
//{DockerContainer::FileShare, QObject::tr("SMB file sharing service - is Window file sharing protocol")},
|
//{DockerContainer::FileShare, QObject::tr("SMB file sharing service - is Window file sharing protocol")},
|
||||||
{DockerContainer::Sftp, QObject::tr("Sftp file sharing service - is secure FTP service")}
|
{DockerContainer::Sftp, QObject::tr("Sftp file sharing service - is secure FTP service")}
|
||||||
|
|
|
@ -76,7 +76,7 @@ QMap<amnezia::Proto, QString> ProtocolProps::protocolHumanNames()
|
||||||
{Proto::Ikev2, "IKEv2"},
|
{Proto::Ikev2, "IKEv2"},
|
||||||
{Proto::L2tp, "L2TP"},
|
{Proto::L2tp, "L2TP"},
|
||||||
|
|
||||||
{Proto::TorWebSite, "Web site in TOR network"},
|
{Proto::TorWebSite, "Web site in Tor network"},
|
||||||
{Proto::Dns, "DNS Service"},
|
{Proto::Dns, "DNS Service"},
|
||||||
{Proto::FileShare, "File Sharing Service"},
|
{Proto::FileShare, "File Sharing Service"},
|
||||||
{Proto::Sftp, QObject::tr("Sftp service")}
|
{Proto::Sftp, QObject::tr("Sftp service")}
|
||||||
|
|
|
@ -158,5 +158,6 @@
|
||||||
<file>images/svg/settings_suggest_black_24dp.svg</file>
|
<file>images/svg/settings_suggest_black_24dp.svg</file>
|
||||||
<file>ui/qml/Controls/SvgButtonType.qml</file>
|
<file>ui/qml/Controls/SvgButtonType.qml</file>
|
||||||
<file>ui/qml/Pages/PageQrDecoderIos.qml</file>
|
<file>ui/qml/Pages/PageQrDecoderIos.qml</file>
|
||||||
|
<file>server_scripts/website_tor/Dockerfile</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
3
client/server_scripts/website_tor/Dockerfile
Normal file
3
client/server_scripts/website_tor/Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
FROM amneziavpn/torpress:latest
|
||||||
|
|
||||||
|
LABEL maintainer="AmneziaVPN"
|
|
@ -1,3 +1,3 @@
|
||||||
sleep 5
|
sleep 5
|
||||||
# get onions list
|
# get onions list
|
||||||
onions
|
cat /var/lib/tor/hidden_service/hostname
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# Run container
|
sudo docker run -d \
|
||||||
sudo docker stop amnezia-tor
|
--log-driver none \
|
||||||
sudo docker rm amnezia-tor
|
--restart always \
|
||||||
sudo docker run -d -p 80:80 --restart always --name $CONTAINER_NAME tutum/wordpress
|
--name $CONTAINER_NAME \
|
||||||
sudo docker run -d --link $CONTAINER_NAME --name amnezia-tor goldy/tor-hidden-service
|
$CONTAINER_NAME
|
||||||
sudo docker exec -i amnezia-tor apk add bash
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
import ProtocolEnum 1.0
|
import ProtocolEnum 1.0
|
||||||
import "../"
|
import "../"
|
||||||
import "../../Controls"
|
import "../../Controls"
|
||||||
|
@ -16,43 +17,54 @@ PageProtocolBase {
|
||||||
|
|
||||||
Caption {
|
Caption {
|
||||||
id: caption
|
id: caption
|
||||||
text: qsTr("TOR Web site settings")
|
text: qsTr("Tor Web Site settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: frame_settings
|
ColumnLayout {
|
||||||
width: parent.width
|
id: content
|
||||||
|
enabled: logic.pageEnabled
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
|
anchors.left: root.left
|
||||||
|
anchors.right: root.right
|
||||||
|
anchors.bottom: pb_save.top
|
||||||
|
anchors.margins: 20
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
|
|
||||||
border.width: 1
|
|
||||||
border.color: "lightgray"
|
|
||||||
anchors.bottomMargin: 5
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
radius: 2
|
|
||||||
Grid {
|
|
||||||
id: grid
|
|
||||||
anchors.fill: parent
|
|
||||||
columns: 2
|
|
||||||
horizontalItemAlignment: Grid.AlignHCenter
|
|
||||||
verticalItemAlignment: Grid.AlignVCenter
|
|
||||||
topPadding: 5
|
|
||||||
leftPadding: 30
|
|
||||||
rightPadding: 30
|
|
||||||
spacing: 5
|
|
||||||
|
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
LabelType {
|
LabelType {
|
||||||
width: 130
|
id: lbl_onion
|
||||||
|
Layout.preferredWidth: 0.3 * root.width - 10
|
||||||
text: qsTr("Web site onion address")
|
text: qsTr("Web site onion address")
|
||||||
}
|
}
|
||||||
TextFieldType {
|
TextFieldType {
|
||||||
id: tf_site_address
|
id: tf_site_address
|
||||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
Layout.fillWidth: true
|
||||||
text: logic.labelTorWebSiteAddressText
|
text: logic.labelTorWebSiteAddressText
|
||||||
readOnly: true
|
readOnly: true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ShareConnectionButtonCopyType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 5
|
||||||
|
copyText: tf_site_address.text
|
||||||
|
}
|
||||||
|
|
||||||
|
RichLabelType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 15
|
||||||
|
text: qsTr("Notes:<ul>
|
||||||
|
<li>Use <a href=\"https://www.torproject.org/download/\">Tor Browser</a> to open this url.</li>
|
||||||
|
<li>After installation it takes several minutes while your onion site will become available in the Tor Network.</li>
|
||||||
|
<li>When configuring WordPress set the domain as this onion address.</li>
|
||||||
|
</ul>
|
||||||
|
")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,6 @@ PageShareProtocolBase {
|
||||||
|
|
||||||
Caption {
|
Caption {
|
||||||
id: caption
|
id: caption
|
||||||
text: qsTr("Share TOR Web site")
|
text: qsTr("Share Tor Web site")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue