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;
|
||||
|
||||
QStringList l = stdOut.split(",");
|
||||
for (QString s : l) {
|
||||
if (s.contains(":80")) {
|
||||
protocol.insert(config_key::site, s);
|
||||
}
|
||||
}
|
||||
QString onion = stdOut;
|
||||
onion.replace("\n", "");
|
||||
protocol.insert(config_key::site, onion);
|
||||
|
||||
containerConfig.insert(ProtocolProps::protoToString(mainProto), protocol);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ QMap<DockerContainer, QString> ContainerProps::containerHumanNames()
|
|||
{DockerContainer::WireGuard, "WireGuard"},
|
||||
{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::FileShare, QObject::tr("SMB 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::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::FileShare, QObject::tr("SMB file sharing service - is Window file sharing protocol")},
|
||||
{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::L2tp, "L2TP"},
|
||||
|
||||
{Proto::TorWebSite, "Web site in TOR network"},
|
||||
{Proto::TorWebSite, "Web site in Tor network"},
|
||||
{Proto::Dns, "DNS Service"},
|
||||
{Proto::FileShare, "File Sharing Service"},
|
||||
{Proto::Sftp, QObject::tr("Sftp service")}
|
||||
|
|
|
@ -158,5 +158,6 @@
|
|||
<file>images/svg/settings_suggest_black_24dp.svg</file>
|
||||
<file>ui/qml/Controls/SvgButtonType.qml</file>
|
||||
<file>ui/qml/Pages/PageQrDecoderIos.qml</file>
|
||||
<file>server_scripts/website_tor/Dockerfile</file>
|
||||
</qresource>
|
||||
</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
|
||||
# get onions list
|
||||
onions
|
||||
cat /var/lib/tor/hidden_service/hostname
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# Run container
|
||||
sudo docker stop amnezia-tor
|
||||
sudo docker rm amnezia-tor
|
||||
sudo docker run -d -p 80:80 --restart always --name $CONTAINER_NAME tutum/wordpress
|
||||
sudo docker run -d --link $CONTAINER_NAME --name amnezia-tor goldy/tor-hidden-service
|
||||
sudo docker exec -i amnezia-tor apk add bash
|
||||
sudo docker run -d \
|
||||
--log-driver none \
|
||||
--restart always \
|
||||
--name $CONTAINER_NAME \
|
||||
$CONTAINER_NAME
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.15
|
||||
import ProtocolEnum 1.0
|
||||
import "../"
|
||||
import "../../Controls"
|
||||
|
@ -16,43 +17,54 @@ PageProtocolBase {
|
|||
|
||||
Caption {
|
||||
id: caption
|
||||
text: qsTr("TOR Web site settings")
|
||||
text: qsTr("Tor Web Site settings")
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: frame_settings
|
||||
width: parent.width
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: caption.bottom
|
||||
anchors.left: root.left
|
||||
anchors.right: root.right
|
||||
anchors.bottom: pb_save.top
|
||||
anchors.margins: 20
|
||||
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 {
|
||||
width: 130
|
||||
id: lbl_onion
|
||||
Layout.preferredWidth: 0.3 * root.width - 10
|
||||
text: qsTr("Web site onion address")
|
||||
}
|
||||
TextFieldType {
|
||||
id: tf_site_address
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
Layout.fillWidth: true
|
||||
text: logic.labelTorWebSiteAddressText
|
||||
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 {
|
||||
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