代理界面
This commit is contained in:
parent
0fe126d1e2
commit
13b391eb69
|
@ -1,10 +1,16 @@
|
||||||
kylin-nm (3.14.0.0+0512-2k11) v101; urgency=medium
|
kylin-nm (3.14.0.0+0512-3k11) yangtz; urgency=medium
|
||||||
|
|
||||||
|
* 合并3.22需求
|
||||||
|
|
||||||
|
-- zhaoshixu <zhaoshixu@kylinos.cn> Mon, 21 Nov 2022 15:31:28 +0800
|
||||||
|
|
||||||
|
kylin-nm (3.14.0.0+0512-2k11) yangtz; urgency=medium
|
||||||
|
|
||||||
* 修改因有线连接未指定网卡造成VPN托盘崩溃的问题
|
* 修改因有线连接未指定网卡造成VPN托盘崩溃的问题
|
||||||
|
|
||||||
-- zhaoshixu <zhaoshixu@kylinos.cn> Fri, 21 Oct 2022 16:35:19 +0800
|
-- zhaoshixu <zhaoshixu@kylinos.cn> Fri, 21 Oct 2022 16:35:19 +0800
|
||||||
|
|
||||||
kylin-nm (3.14.0.0+0512-2k10) v101; urgency=medium
|
kylin-nm (3.14.0.0+0512-2k10) yangtz; urgency=medium
|
||||||
|
|
||||||
* 托盘vpn需求
|
* 托盘vpn需求
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,8 @@ set -e
|
||||||
path="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/libnetconnect.so"
|
path="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/libnetconnect.so"
|
||||||
dpkg-divert --package kylin-nm --rename --divert "$path"".old" --add $path
|
dpkg-divert --package kylin-nm --rename --divert "$path"".old" --add $path
|
||||||
|
|
||||||
path2="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/libvpn.so"
|
path2="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/libproxy.so"
|
||||||
dpkg-divert --package kylin-nm --rename --divert "$path2"".old" --add $path2
|
dpkg-divert --package kylin-nm --rename --divert "$path2"".old" --add $path2
|
||||||
|
|
||||||
|
path3="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/ukui-control-center/libvpn.so"
|
||||||
|
dpkg-divert --package kylin-nm --rename --divert "$path3"".old" --add $path3
|
||||||
|
|
|
@ -3,4 +3,5 @@ SUBDIRS = \
|
||||||
netconnect \
|
netconnect \
|
||||||
wlanconnect \
|
wlanconnect \
|
||||||
mobilehotspot \
|
mobilehotspot \
|
||||||
|
proxy \
|
||||||
vpn \
|
vpn \
|
||||||
|
|
|
@ -0,0 +1,138 @@
|
||||||
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include "applistwidget.h"
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
AppListWidget::AppListWidget(QString path, QWidget *parent)
|
||||||
|
: m_path(path), QWidget(parent)
|
||||||
|
{
|
||||||
|
initUI();
|
||||||
|
initDbus();
|
||||||
|
}
|
||||||
|
|
||||||
|
AppListWidget::~AppListWidget()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AppListWidget::setAppChecked
|
||||||
|
* @param flag 是否使用应用代理配置
|
||||||
|
*/
|
||||||
|
void AppListWidget::setAppChecked(bool flag)
|
||||||
|
{
|
||||||
|
m_checkBox->setChecked(flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AppListWidget::setAppIcon
|
||||||
|
* @param icon 应用图标的名称
|
||||||
|
*/
|
||||||
|
void AppListWidget::setAppIcon(const QPixmap &icon)
|
||||||
|
{
|
||||||
|
m_iconLabel->setAlignment(Qt::AlignCenter);
|
||||||
|
m_iconLabel->setPixmap(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AppListWidget::setAppName
|
||||||
|
* @param text 应用名称
|
||||||
|
*/
|
||||||
|
void AppListWidget::setAppName(const QString &text)
|
||||||
|
{
|
||||||
|
m_nameLabel->setText(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AppListWidget::onAppCheckStateChanged
|
||||||
|
* checkBox是否选中 关联是否配置应用代理
|
||||||
|
*/
|
||||||
|
void AppListWidget::onAppCheckStateChanged()
|
||||||
|
{
|
||||||
|
if (m_checkBox->isChecked()) {
|
||||||
|
AddAppProxyConfig();
|
||||||
|
} else {
|
||||||
|
RemoveAppProxyConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AppListWidget::AddAppProxyConfig
|
||||||
|
* 将该路径下的应用加入应用代理
|
||||||
|
*/
|
||||||
|
void AppListWidget::AddAppProxyConfig()
|
||||||
|
{
|
||||||
|
if(!m_dbusInterface->isValid()) {
|
||||||
|
qWarning ()<< "init AppProxy dbus error";
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "call QDBusInterface addAppIntoProxy";
|
||||||
|
m_dbusInterface->call("addAppIntoProxy", m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AppListWidget::RemoveAppProxyConfig
|
||||||
|
* 将该路径下的应用移出应用代理
|
||||||
|
*/
|
||||||
|
void AppListWidget::RemoveAppProxyConfig()
|
||||||
|
{
|
||||||
|
if(!m_dbusInterface->isValid()) {
|
||||||
|
qWarning ()<< "init AppProxy dbus error";
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "call QDBusInterface delAppIntoProxy";
|
||||||
|
m_dbusInterface->call("delAppIntoProxy", m_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppListWidget::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (event->button() == Qt::LeftButton) {
|
||||||
|
m_checkBox->setChecked(!m_checkBox->isChecked());
|
||||||
|
onAppCheckStateChanged();
|
||||||
|
}
|
||||||
|
return QWidget::mousePressEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppListWidget::initUI()
|
||||||
|
{
|
||||||
|
QHBoxLayout *mainLayout = new QHBoxLayout(this);
|
||||||
|
mainLayout->setContentsMargins(17, 0, 17, 0);
|
||||||
|
mainLayout->setSpacing(8);
|
||||||
|
m_checkBox = new QCheckBox(this);
|
||||||
|
m_checkBox->setFixedSize(16, 16);
|
||||||
|
m_checkBox->setAttribute(Qt::WA_TransparentForMouseEvents, true); //m_checkBox不响应鼠标事件,将其传递给父窗口
|
||||||
|
m_iconLabel = new QLabel(this);
|
||||||
|
m_iconLabel->setFixedSize(24, 24);
|
||||||
|
m_nameLabel = new QLabel(this);
|
||||||
|
|
||||||
|
mainLayout->addWidget(m_checkBox);
|
||||||
|
mainLayout->addSpacing(8);
|
||||||
|
mainLayout->addWidget(m_iconLabel);
|
||||||
|
mainLayout->addWidget(m_nameLabel);
|
||||||
|
mainLayout->addStretch();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppListWidget::initDbus()
|
||||||
|
{
|
||||||
|
m_dbusInterface = new QDBusInterface("org.ukui.SettingsDaemon",
|
||||||
|
"/org/ukui/SettingsDaemon/AppProxy",
|
||||||
|
"org.ukui.SettingsDaemon.AppProxy",
|
||||||
|
QDBusConnection::sessionBus());
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef APPLISTWIDGET_H
|
||||||
|
#define APPLISTWIDGET_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QDBusInterface>
|
||||||
|
#include <QDBusReply>
|
||||||
|
|
||||||
|
class AppListWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit AppListWidget(QString path, QWidget *parent = nullptr);
|
||||||
|
~AppListWidget();
|
||||||
|
|
||||||
|
void setAppChecked(bool flag);
|
||||||
|
void setAppIcon(const QPixmap &icon);
|
||||||
|
void setAppName(const QString &text);
|
||||||
|
void onAppCheckStateChanged();
|
||||||
|
void AddAppProxyConfig();
|
||||||
|
void RemoveAppProxyConfig();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void initUI();
|
||||||
|
void initDbus();
|
||||||
|
|
||||||
|
QCheckBox *m_checkBox = nullptr;
|
||||||
|
QLabel *m_iconLabel = nullptr;
|
||||||
|
QLabel *m_nameLabel = nullptr;
|
||||||
|
QString m_path = nullptr;
|
||||||
|
QDBusInterface *m_dbusInterface = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // APPLISTWIDGET_H
|
|
@ -0,0 +1,32 @@
|
||||||
|
#ifndef APTINFO_H
|
||||||
|
#define APTINFO_H
|
||||||
|
#include <QHash>
|
||||||
|
#include <QVariant>
|
||||||
|
#include <QString>
|
||||||
|
#include <QDBusArgument>
|
||||||
|
|
||||||
|
struct AptInfo
|
||||||
|
{
|
||||||
|
QString arg;
|
||||||
|
QDBusVariant out;
|
||||||
|
};
|
||||||
|
|
||||||
|
QDBusArgument &operator<<(QDBusArgument &argument, const AptInfo &mystruct)
|
||||||
|
{
|
||||||
|
argument.beginStructure();
|
||||||
|
argument << mystruct.arg << mystruct.out;
|
||||||
|
argument.endStructure();
|
||||||
|
return argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QDBusArgument &operator>>(const QDBusArgument &argument, AptInfo &mystruct)
|
||||||
|
{
|
||||||
|
argument.beginStructure();
|
||||||
|
argument >> mystruct.arg >> mystruct.out;
|
||||||
|
argument.endStructure();
|
||||||
|
return argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(AptInfo)
|
||||||
|
|
||||||
|
#endif // APTINFO_H
|
|
@ -0,0 +1,127 @@
|
||||||
|
#include "aptproxydialog.h"
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QSpacerItem>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include "proxy.h"
|
||||||
|
|
||||||
|
AptProxyDialog::AptProxyDialog(QWidget *parent ):
|
||||||
|
QDialog(parent)
|
||||||
|
{
|
||||||
|
initUi();
|
||||||
|
setupComponent();
|
||||||
|
initConnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
AptProxyDialog::~AptProxyDialog()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void AptProxyDialog::initUi()
|
||||||
|
{
|
||||||
|
setWindowTitle(tr("Set Apt Proxy"));
|
||||||
|
this->setFixedSize(480, 200);
|
||||||
|
|
||||||
|
QVBoxLayout *mAptProxyLyt = new QVBoxLayout(this);
|
||||||
|
mAptProxyLyt->setContentsMargins(24, 24, 24, 24);
|
||||||
|
mAptProxyLyt->setSpacing(16);
|
||||||
|
|
||||||
|
QFrame *mHostFrame = new QFrame(this);
|
||||||
|
mHostFrame->setFixedSize(432, 36);
|
||||||
|
mHostFrame->setFrameShape(QFrame::NoFrame);
|
||||||
|
|
||||||
|
QHBoxLayout *mLyt_1= new QHBoxLayout(mHostFrame);
|
||||||
|
mLyt_1->setContentsMargins(0, 0, 0, 0);
|
||||||
|
mLyt_1->setSpacing(8);
|
||||||
|
|
||||||
|
FixLabel *mSetHostLabel = new FixLabel(mHostFrame);
|
||||||
|
mSetHostLabel->setFixedSize(92, 36);
|
||||||
|
mSetHostLabel->setText(tr("Server Address"));
|
||||||
|
|
||||||
|
mHostEdit = new QLineEdit(mHostFrame);
|
||||||
|
mHostEdit->setAttribute(Qt::WA_InputMethodEnabled, false); //限制中文输入法
|
||||||
|
mHostEdit->setFixedSize(332, 36);
|
||||||
|
mHostEdit->installEventFilter(this);
|
||||||
|
|
||||||
|
mLyt_1->addWidget(mSetHostLabel);
|
||||||
|
mLyt_1->addWidget(mHostEdit);
|
||||||
|
|
||||||
|
QFrame *mPortFrame = new QFrame(this);
|
||||||
|
mPortFrame->setFixedSize(432, 36);
|
||||||
|
mPortFrame->setFrameShape(QFrame::NoFrame);
|
||||||
|
|
||||||
|
QHBoxLayout *mLyt_2= new QHBoxLayout(mPortFrame);
|
||||||
|
mLyt_2->setContentsMargins(0, 0, 0, 0);
|
||||||
|
mLyt_2->setSpacing(8);
|
||||||
|
|
||||||
|
QLabel *mSetPortLabel = new QLabel(tr("Port") ,mPortFrame);
|
||||||
|
mSetPortLabel->setFixedSize(92, 36);
|
||||||
|
|
||||||
|
mPortEdit = new QLineEdit(mPortFrame);
|
||||||
|
mPortEdit->setAttribute(Qt::WA_InputMethodEnabled, false); //限制中文输入法
|
||||||
|
mPortEdit->setFixedSize(332, 36);
|
||||||
|
mPortEdit->installEventFilter(this);
|
||||||
|
|
||||||
|
mLyt_2->addWidget(mSetPortLabel);
|
||||||
|
mLyt_2->addWidget(mPortEdit);
|
||||||
|
|
||||||
|
QFrame *mChooseFrame = new QFrame(this);
|
||||||
|
mChooseFrame->setFixedWidth(432);
|
||||||
|
mChooseFrame->setFrameShape(QFrame::NoFrame);
|
||||||
|
|
||||||
|
QHBoxLayout *mLyt_3= new QHBoxLayout(mChooseFrame);
|
||||||
|
mLyt_3->setContentsMargins(0, 0, 0, 0);
|
||||||
|
mLyt_3->setSpacing(16);
|
||||||
|
|
||||||
|
mCancelBtn = new QPushButton(mChooseFrame);
|
||||||
|
mCancelBtn->setMinimumWidth(96);
|
||||||
|
mCancelBtn->setText(tr("Cancel"));
|
||||||
|
|
||||||
|
mConfirmBtn = new QPushButton(mChooseFrame);
|
||||||
|
mConfirmBtn->setMinimumWidth(96);
|
||||||
|
mConfirmBtn->setText(tr("Confirm"));
|
||||||
|
|
||||||
|
mLyt_3->addStretch();
|
||||||
|
mLyt_3->addWidget(mCancelBtn);
|
||||||
|
mLyt_3->addWidget(mConfirmBtn);
|
||||||
|
|
||||||
|
mAptProxyLyt->addWidget(mHostFrame);
|
||||||
|
mAptProxyLyt->addWidget(mPortFrame);
|
||||||
|
mAptProxyLyt->addSpacing(16);
|
||||||
|
mAptProxyLyt->addWidget(mChooseFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AptProxyDialog::initConnect()
|
||||||
|
{
|
||||||
|
connect(mHostEdit, &QLineEdit::textEdited, this, [=]() {
|
||||||
|
if (mHostEdit->text().isEmpty()) {
|
||||||
|
mConfirmBtn->setEnabled(false);
|
||||||
|
} else {
|
||||||
|
mConfirmBtn->setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(mCancelBtn, &QPushButton::clicked, this, [=]() {
|
||||||
|
this->close();
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(mConfirmBtn, &QPushButton::clicked, this, [=]() {
|
||||||
|
Proxy::setAptProxy(mHostEdit->text() , mPortEdit->text() , true);
|
||||||
|
this->close();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void AptProxyDialog::setupComponent()
|
||||||
|
{
|
||||||
|
QString host = Proxy::getAptProxy()["ip"].toString();
|
||||||
|
QString port = Proxy::getAptProxy()["port"].toString();;
|
||||||
|
|
||||||
|
mHostEdit->setText(host);
|
||||||
|
mPortEdit->setText(port);
|
||||||
|
|
||||||
|
if (host.isEmpty()) {
|
||||||
|
mConfirmBtn->setEnabled(false);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
#ifndef APTPROXYDIALOG_H
|
||||||
|
#define APTPROXYDIALOG_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QGSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QDialog>
|
||||||
|
#include "fixlabel.h"
|
||||||
|
|
||||||
|
#define APT_PROXY_SCHEMA "org.ukui.control-center.apt.proxy"
|
||||||
|
#define APT_PROXY_ENABLED "enabled"
|
||||||
|
#define APT_PROXY_HOST_KEY "host"
|
||||||
|
#define APT_PROXY_PORT_KEY "port"
|
||||||
|
|
||||||
|
class AptProxyDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AptProxyDialog(QWidget *parent = nullptr);
|
||||||
|
~AptProxyDialog();
|
||||||
|
|
||||||
|
void initUi();
|
||||||
|
private:
|
||||||
|
QLineEdit *mHostEdit;
|
||||||
|
QLineEdit *mPortEdit;
|
||||||
|
|
||||||
|
QPushButton *mCancelBtn;
|
||||||
|
QPushButton *mConfirmBtn;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void initConnect();
|
||||||
|
void setupComponent();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // APTPROXYDIALOG_H
|
|
@ -0,0 +1,31 @@
|
||||||
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef CERTIFICATIONDIALOG_H
|
||||||
|
#define CERTIFICATIONDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
#define HTTP_PROXY_SCHEMA "org.gnome.system.proxy.http"
|
||||||
|
#define HTTP_AUTH_KEY "use-authentication"
|
||||||
|
#define HTTP_AUTH_USER_KEY "authentication-user"
|
||||||
|
#define HTTP_AUTH_PASSWD_KEY "authentication-password"
|
||||||
|
|
||||||
|
|
||||||
|
#endif // CERTIFICATIONDIALOG_H
|
|
@ -0,0 +1,342 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CertificationDialog</class>
|
||||||
|
<widget class="QDialog" name="CertificationDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>500</width>
|
||||||
|
<height>246</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>246</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>246</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>UserCertification</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>25</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="activeHLayout" stretch="0">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>UserCertification</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>User:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="userLineEdit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>180</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>180</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Passwd:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="pwdLineEdit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>180</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>180</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="closePushBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Close</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>80</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,285 @@
|
||||||
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef PROXY_H
|
||||||
|
#define PROXY_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QtPlugin>
|
||||||
|
#include <QFileSystemWatcher>
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include "certificationdialog.h"
|
||||||
|
|
||||||
|
#include <QGSettings>
|
||||||
|
#include <QRadioButton>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QTextEdit>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QListWidget>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QDBusInterface>
|
||||||
|
#include <QDBusConnection>
|
||||||
|
#include <QDBusError>
|
||||||
|
#include <QDBusReply>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QtDBus/QDBusMetaType>
|
||||||
|
|
||||||
|
#include "interface.h"
|
||||||
|
#include "titlelabel.h"
|
||||||
|
#include "hoverwidget.h"
|
||||||
|
#include "applistwidget.h"
|
||||||
|
|
||||||
|
#include "kswitchbutton.h"
|
||||||
|
#include "kpasswordedit.h"
|
||||||
|
|
||||||
|
using namespace kdk;
|
||||||
|
|
||||||
|
/* qt会将glib里的signals成员识别为宏,所以取消该宏
|
||||||
|
* 后面如果用到signals时,使用Q_SIGNALS代替即可
|
||||||
|
**/
|
||||||
|
#ifdef signals
|
||||||
|
#undef signals
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
#include <gio/gio.h>
|
||||||
|
|
||||||
|
struct GSData
|
||||||
|
{
|
||||||
|
QString key;
|
||||||
|
QString schema;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef enum{
|
||||||
|
NONE,
|
||||||
|
MANUAL,
|
||||||
|
AUTO
|
||||||
|
}ProxyMode;
|
||||||
|
|
||||||
|
//自定义类型使用QVariant需要使用 Q_DECLARE_METATYPE 注册
|
||||||
|
Q_DECLARE_METATYPE(ProxyMode)
|
||||||
|
Q_DECLARE_METATYPE(GSData)
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Proxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Proxy : public QObject, CommonInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PLUGIN_METADATA(IID "org.ukcc.CommonInterface")
|
||||||
|
Q_INTERFACES(CommonInterface)
|
||||||
|
|
||||||
|
public:
|
||||||
|
Proxy();
|
||||||
|
~Proxy();
|
||||||
|
|
||||||
|
QString plugini18nName() Q_DECL_OVERRIDE;
|
||||||
|
int pluginTypes() Q_DECL_OVERRIDE;
|
||||||
|
QWidget * pluginUi() Q_DECL_OVERRIDE;
|
||||||
|
void plugin_leave()Q_DECL_OVERRIDE;
|
||||||
|
const QString name() const Q_DECL_OVERRIDE;
|
||||||
|
bool isShowOnHomePage() const Q_DECL_OVERRIDE;
|
||||||
|
QIcon icon() const Q_DECL_OVERRIDE;
|
||||||
|
bool isEnable() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void initUi(QWidget *widget);
|
||||||
|
void initSearchText();
|
||||||
|
void retranslateUi();
|
||||||
|
void setupComponent();
|
||||||
|
void setupConnect();
|
||||||
|
void initProxyModeStatus();
|
||||||
|
void initAutoProxyStatus();
|
||||||
|
void initManualProxyStatus();
|
||||||
|
void initIgnoreHostStatus();
|
||||||
|
void initDbus();
|
||||||
|
void initAppProxyStatus();
|
||||||
|
|
||||||
|
void manualProxyTextChanged(QString txt);
|
||||||
|
int _getCurrentProxyMode();
|
||||||
|
void _setSensitivity();
|
||||||
|
bool getAptProxyInfo(bool status);
|
||||||
|
static void setAptProxy(QString host ,QString port ,bool status); // apt代理对应的配置文件的写入或删除
|
||||||
|
static QHash<QString, QVariant> getAptProxy();
|
||||||
|
void setAptInfo();
|
||||||
|
void reboot(); // 调用重启接口
|
||||||
|
|
||||||
|
void setFrame_Noframe(QFrame *frame);
|
||||||
|
QFrame *setLine(QFrame *frame);
|
||||||
|
|
||||||
|
bool getAppProxyState(); //获取应用代理开启状态--调用Dbus
|
||||||
|
void setAppProxyState(bool state); //设置应用代理开启状态--调用Dbus
|
||||||
|
static QStringList getAppProxyConf(); //获取应用代理配置信息--调用Dbus
|
||||||
|
void setAppProxyConf(QStringList list); //设置应用代理配置信息--调用Dbus
|
||||||
|
static QMap<QString, QStringList> getAppListProxy();
|
||||||
|
// bool checkIsChanged(QStringList info);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setAppProxyFrameUi(QWidget *widget);
|
||||||
|
void setAppListFrameUi(QWidget *widget);
|
||||||
|
void appProxyInfoPadding();
|
||||||
|
void appListPadding();
|
||||||
|
bool getipEditState(QString text);
|
||||||
|
|
||||||
|
QString pluginName;
|
||||||
|
int pluginType;
|
||||||
|
QWidget * pluginWidget;
|
||||||
|
|
||||||
|
TitleLabel *mTitleLabel;
|
||||||
|
TitleLabel *m_appProxyLabel;
|
||||||
|
TitleLabel *mAptProxyLabel;
|
||||||
|
QLabel *mUrlLabel;
|
||||||
|
QLabel *mHTTPLabel;
|
||||||
|
QLabel *mHTTPPortLabel;
|
||||||
|
QLabel *mHTTPSLabel;
|
||||||
|
QLabel *mHTTPSPortLabel;
|
||||||
|
QLabel *mFTPLabel;
|
||||||
|
QLabel *mFTPPortLabel;
|
||||||
|
QLabel *mSOCKSLabel;
|
||||||
|
QLabel *mSOCKSPortLabel;
|
||||||
|
QLabel *mIgnoreLabel;
|
||||||
|
QLabel *mAptLabel;
|
||||||
|
QLabel *mAPTHostLabel_1;
|
||||||
|
QLabel *mAPTHostLabel_2;
|
||||||
|
QLabel *mAPTPortLabel_1;
|
||||||
|
QLabel *mAPTPortLabel_2;
|
||||||
|
|
||||||
|
QLabel *mCertificationLabel;
|
||||||
|
QLabel *mUserNameLabel;
|
||||||
|
QLabel *mPwdLabel;
|
||||||
|
|
||||||
|
QLabel *m_appEnableLabel;
|
||||||
|
QLabel *m_proxyTypeLabel;
|
||||||
|
QLabel *m_ipAddressLabel;
|
||||||
|
QLabel *m_ipHintsLabel;
|
||||||
|
QLabel *m_portLabel;
|
||||||
|
QLabel *m_userNameLabel;
|
||||||
|
QLabel *m_pwdLabel;
|
||||||
|
QLabel *m_allowAppProxyLabel;
|
||||||
|
|
||||||
|
QFrame *mProxyFrame;
|
||||||
|
QFrame *mEnableFrame;
|
||||||
|
QFrame *mSelectFrame;
|
||||||
|
QFrame *mUrlFrame;
|
||||||
|
|
||||||
|
QFrame *mHTTPFrame;
|
||||||
|
QFrame *mHTTPSFrame;
|
||||||
|
QFrame *mFTPFrame;
|
||||||
|
QFrame *mSOCKSFrame;
|
||||||
|
QFrame *mIgnoreFrame;
|
||||||
|
QFrame *mCertificationFrame_1;
|
||||||
|
|
||||||
|
QFrame *m_appEnableFrame;
|
||||||
|
QFrame *m_appProxyFrame;
|
||||||
|
QFrame *m_proxyTypeFrame;
|
||||||
|
QFrame *m_ipAddressFrame;
|
||||||
|
QFrame *m_portFrame;
|
||||||
|
QFrame *m_userNameFrame;
|
||||||
|
QFrame *m_pwdFrame;
|
||||||
|
// QFrame *m_appBtnFrame;
|
||||||
|
QFrame *m_appListFrame;
|
||||||
|
|
||||||
|
QFrame *mAPTFrame;
|
||||||
|
QFrame *mAPTFrame_1;
|
||||||
|
QFrame *mAPTFrame_2;
|
||||||
|
|
||||||
|
QFrame *line_1;
|
||||||
|
QFrame *line_2;
|
||||||
|
QFrame *line_3;
|
||||||
|
QFrame *line_4;
|
||||||
|
QFrame *line_5;
|
||||||
|
QFrame *line_6;
|
||||||
|
QFrame *line_7;
|
||||||
|
QFrame *line_8;
|
||||||
|
QFrame *m_appLine1;
|
||||||
|
QFrame *m_appLine2;
|
||||||
|
QFrame *m_appLine3;
|
||||||
|
QFrame *m_appLine4;
|
||||||
|
QFrame *m_appLine5;
|
||||||
|
|
||||||
|
QRadioButton *mAutoBtn;
|
||||||
|
QRadioButton *mManualBtn;
|
||||||
|
KSwitchButton *mEnableBtn;
|
||||||
|
KSwitchButton *mAptBtn;
|
||||||
|
QPushButton *mEditBtn;
|
||||||
|
QCheckBox *mCertificationBtn;
|
||||||
|
|
||||||
|
QButtonGroup *mProxyBtnGroup;
|
||||||
|
|
||||||
|
QLineEdit *mUrlLineEdit;
|
||||||
|
QLineEdit *mHTTPLineEdit_1;
|
||||||
|
QLineEdit *mHTTPLineEdit_2;
|
||||||
|
QLineEdit *mHTTPSLineEdit_1;
|
||||||
|
QLineEdit *mHTTPSLineEdit_2;
|
||||||
|
QLineEdit *mFTPLineEdit_1;
|
||||||
|
QLineEdit *mFTPLineEdit_2;
|
||||||
|
QLineEdit *mSOCKSLineEdit_1;
|
||||||
|
QLineEdit *mSOCKSLineEdit_2;
|
||||||
|
QLineEdit *mUserNameLineEdit;
|
||||||
|
QLineEdit *mPwdLineEdit;
|
||||||
|
QLineEdit *m_ipAddressLineEdit;
|
||||||
|
QLineEdit *m_portLineEdit;
|
||||||
|
QLineEdit *m_userNameLineEdit;
|
||||||
|
|
||||||
|
KSwitchButton *m_appEnableBtn;
|
||||||
|
QComboBox *m_proxyTypeComboBox;
|
||||||
|
KPasswordEdit *m_pwdLineEdit = nullptr;
|
||||||
|
// QPushButton *m_cancelBtn;
|
||||||
|
// QPushButton *m_saveBtn;
|
||||||
|
QListWidget *m_appListWidget = nullptr;
|
||||||
|
|
||||||
|
QTextEdit *mIgnoreLineEdit;
|
||||||
|
|
||||||
|
QGSettings * proxysettings;
|
||||||
|
QGSettings * httpsettings;
|
||||||
|
QGSettings * securesettings;
|
||||||
|
QGSettings * ftpsettings;
|
||||||
|
QGSettings * sockssettings;
|
||||||
|
QGSettings * aptsettings;
|
||||||
|
|
||||||
|
QFileSystemWatcher *mfileWatch_1;
|
||||||
|
QFileSystemWatcher *mfileWatch_2;
|
||||||
|
|
||||||
|
QDBusInterface *mAptproxyDbus;
|
||||||
|
QDBusInterface *m_appProxyDbus;
|
||||||
|
|
||||||
|
bool isExistSettings = false;
|
||||||
|
bool settingsCreate;
|
||||||
|
bool mFirstLoad;
|
||||||
|
QStringList m_appProxyInfo;
|
||||||
|
QStringList m_appCheckedList;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void setAptProxySlot(); //处理apt代理前端交互逻辑
|
||||||
|
void onappProxyEnableChanged(bool enable); //IP地址无效提示
|
||||||
|
void onipEditStateChanged(); //IP地址无效提示
|
||||||
|
void onAppProxyConfChanged(); //应用代理配置信息变化
|
||||||
|
void onAppProxyConfEditFinished();
|
||||||
|
// void onCancelBtnClicked();
|
||||||
|
// void onSaveBtnClicked();
|
||||||
|
// void setBtnEnable();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PROXY_H
|
|
@ -0,0 +1,52 @@
|
||||||
|
#include(../../../env.pri)
|
||||||
|
|
||||||
|
QT += widgets dbus
|
||||||
|
|
||||||
|
TEMPLATE = lib
|
||||||
|
CONFIG += plugin
|
||||||
|
|
||||||
|
TARGET = $$qtLibraryTarget(proxy)
|
||||||
|
DESTDIR = ../..
|
||||||
|
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
|
||||||
|
trans.files = translations/*
|
||||||
|
trans.path = /usr/share/kylin-nm/proxy/
|
||||||
|
|
||||||
|
INCLUDEPATH += \
|
||||||
|
$$PROJECT_COMPONENTSOURCE \
|
||||||
|
$$PROJECT_ROOTDIR \
|
||||||
|
/usr/include/ukcc/interface \
|
||||||
|
/usr/include/ukcc/widgets
|
||||||
|
|
||||||
|
LIBS += -L$$[QT_INSTALL_LIBS] -lgsettings-qt -lukcc
|
||||||
|
|
||||||
|
##加载gio库和gio-unix库,用于获取和设置enum类型的gsettings
|
||||||
|
CONFIG += link_pkgconfig \
|
||||||
|
C++11
|
||||||
|
PKGCONFIG += gio-2.0 \
|
||||||
|
gio-unix-2.0 \
|
||||||
|
gsettings-qt \
|
||||||
|
kysdk-qtwidgets
|
||||||
|
|
||||||
|
#DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
applistwidget.cpp \
|
||||||
|
aptproxydialog.cpp \
|
||||||
|
proxy.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
applistwidget.h \
|
||||||
|
aptinfo.h \
|
||||||
|
aptproxydialog.h \
|
||||||
|
proxy.h \
|
||||||
|
certificationdialog.h
|
||||||
|
|
||||||
|
FORMS +=
|
||||||
|
|
||||||
|
INSTALLS += target \
|
||||||
|
trans
|
||||||
|
|
||||||
|
TRANSLATIONS += \
|
||||||
|
translations/zh_CN.ts \
|
||||||
|
translations/tr.ts \
|
||||||
|
translations/bo_CN.ts
|
Binary file not shown.
|
@ -0,0 +1,227 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="bo_CN">
|
||||||
|
<context>
|
||||||
|
<name>AptProxyDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="24"/>
|
||||||
|
<source>Set Apt Proxy</source>
|
||||||
|
<translation>Apt ངོ་ཚབ་ བཙུགས་པ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="41"/>
|
||||||
|
<source>Server Address</source>
|
||||||
|
<translation>ཞབས་ཞུའི་ས་གནས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="59"/>
|
||||||
|
<source>Port</source>
|
||||||
|
<translation>གྲུ་ཁ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="80"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation>ཕྱིར་འཐེན།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="84"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation>གཏན་འཁེལ་བྱ་དགོས།</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>Proxy</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="63"/>
|
||||||
|
<source>Proxy</source>
|
||||||
|
<translation>ཚབ་བྱེད་མི་སྣ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="194"/>
|
||||||
|
<source>Start using</source>
|
||||||
|
<translation>བཀོལ་སྤྱོད་བྱེད་འགོ་ཚུགས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="207"/>
|
||||||
|
<source>Proxy mode</source>
|
||||||
|
<translation>ཚབ་བྱེད་དཔེ་དབྱིབས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="211"/>
|
||||||
|
<source>Auto</source>
|
||||||
|
<translation>རང་འགུལ་གྱིས་རླངས་</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="214"/>
|
||||||
|
<source>Manual</source>
|
||||||
|
<translation>ལག་དེབ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="369"/>
|
||||||
|
<source>Application Proxy</source>
|
||||||
|
<translation>ཉེར་སྤྱོད་ངོ་ཚབ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="444"/>
|
||||||
|
<source>System Proxy</source>
|
||||||
|
<translation>མ་ལག་གི་ཚབ་བྱེད་</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="446"/>
|
||||||
|
<source>Auto url</source>
|
||||||
|
<translation>རླངས་འཁོར་གྱི་དྲ་ཚིགས།</translation>
|
||||||
|
<extra-contents_path>/Proxy/Auto url</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="448"/>
|
||||||
|
<source>Http Proxy</source>
|
||||||
|
<translation>HTTP ཚབ་བྱེད་མི་སྣ།</translation>
|
||||||
|
<extra-contents_path>/Proxy/Http Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="450"/>
|
||||||
|
<source>Https Proxy</source>
|
||||||
|
<translation>HTTPS ཚབ་བྱེད་མི་སྣ།</translation>
|
||||||
|
<extra-contents_path>/Proxy/Https Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="452"/>
|
||||||
|
<source>Ftp Proxy</source>
|
||||||
|
<translation>FTP ཚབ་བྱེད་མི་སྣ།</translation>
|
||||||
|
<extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="454"/>
|
||||||
|
<source>Socks Proxy</source>
|
||||||
|
<translation>SOCKS ཚབ་བྱེད་མི་སྣ།</translation>
|
||||||
|
<extra-contents_path>/Proxy/Socks Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="455"/>
|
||||||
|
<location filename="../proxy.cpp" line="456"/>
|
||||||
|
<location filename="../proxy.cpp" line="457"/>
|
||||||
|
<location filename="../proxy.cpp" line="458"/>
|
||||||
|
<location filename="../proxy.cpp" line="1047"/>
|
||||||
|
<source>Port</source>
|
||||||
|
<translation>གྲུ་ཁ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="459"/>
|
||||||
|
<source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source>
|
||||||
|
<translation>སྣང་མེད་དུ་བཞག་པའི་བདག་པོའི་མིང་ཐོ། འཇུག་སྒོ་གཅིག་ལས་བརྒལ་ན་དབྱིན་ཡིག་གི་ཕྱེད་ཀ་དང་ཁ་གྱེས་རོགས། (;)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="462"/>
|
||||||
|
<source>Apt Proxy</source>
|
||||||
|
<translation>APT ཚབ་བྱེད་མི་སྣ།</translation>
|
||||||
|
<extra-contents_path>/Proxy/Apt Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="463"/>
|
||||||
|
<location filename="../proxy.cpp" line="984"/>
|
||||||
|
<source>Open</source>
|
||||||
|
<translation>སྒོ་ཕྱེ་བ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="464"/>
|
||||||
|
<source>Server Address : </source>
|
||||||
|
<translation>ཞབས་ཞུའི་ཡོ་བྱད་ཀྱི་གནས་ཡུལ </translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="465"/>
|
||||||
|
<source>Port : </source>
|
||||||
|
<translation>གྲུ་ཁ། </translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="466"/>
|
||||||
|
<source>Edit</source>
|
||||||
|
<translation>རྩོམ་སྒྲིག</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="564"/>
|
||||||
|
<source>The apt proxy has been turned off and needs to be restarted to take effect</source>
|
||||||
|
<translation>ངོ་ཚབ་ཀྱི་སྒོ་བརྒྱབ་ཟིན་པས་ཡང་བསྐྱར་ནུས་པ་ཐོན་པར་བྱ་དགོས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="565"/>
|
||||||
|
<location filename="../proxy.cpp" line="797"/>
|
||||||
|
<source>Reboot Later</source>
|
||||||
|
<translation>རྗེས་སུ་ཡང་བསྐྱར་ཐེངས་གཅིག་ལ་བསྐྱར་</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="566"/>
|
||||||
|
<location filename="../proxy.cpp" line="798"/>
|
||||||
|
<source>Reboot Now</source>
|
||||||
|
<translation>ད་ལྟ་བསྐྱར་དུ་ལས་ཀ་བྱེད་དགོས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="796"/>
|
||||||
|
<source>The system needs to be restarted to set the Apt proxy, whether to reboot</source>
|
||||||
|
<translation>མ་ལག་འདི་བསྐྱར་དུ་འགོ་ཚུགས་ནས་Aptཡི་ཚབ་བྱེད་འཕྲུལ་ཆས་གཏན་འཁེལ་བྱེད་དགོས་པ་དང་། བསྐྱར་དུ་འགོ་འཛུགས་དགོས་མིན་</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="996"/>
|
||||||
|
<source>Proxy type</source>
|
||||||
|
<translation>ངོ་ཚབ་ཀྱི་རིགས་དབྱིབས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>HTTP</source>
|
||||||
|
<translation type="vanished">HTTP</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>socks4</source>
|
||||||
|
<translation type="vanished">རྐང་འབོབ་4</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>socks5</source>
|
||||||
|
<translation type="vanished">རྐང་འབོབ་5</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1013"/>
|
||||||
|
<source>IP address</source>
|
||||||
|
<translation>IPས་གནས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1019"/>
|
||||||
|
<location filename="../proxy.cpp" line="1050"/>
|
||||||
|
<source>Required</source>
|
||||||
|
<translation>བླང་བྱ་བཏོན་པ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1040"/>
|
||||||
|
<source>Invalid IP Address</source>
|
||||||
|
<translation>གོ་མི་ཆོད་པའི་IPས་གནས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1061"/>
|
||||||
|
<source>Username</source>
|
||||||
|
<translation>སྤྱོད་མཁན་གྱི་མིང་།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1064"/>
|
||||||
|
<location filename="../proxy.cpp" line="1078"/>
|
||||||
|
<source>Optional</source>
|
||||||
|
<translation>བསལ་འདེམས་ཀྱི་རང་བཞིན།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1074"/>
|
||||||
|
<source>Password</source>
|
||||||
|
<translation>གསང་གྲངས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1097"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation>ཕྱིར་འཐེན།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1098"/>
|
||||||
|
<source>Save</source>
|
||||||
|
<translation>གྲོན་ཆུང་བྱེད་དགོས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1160"/>
|
||||||
|
<source>The following applications are allowed to use this configuration:</source>
|
||||||
|
<translation>གཤམ་གྱི་ཉེར་སྤྱོད་གོ་རིམ་ཁྲོད་དུ་བཀོད་སྒྲིག་འདི་བཀོལ་ཆོག་པ་སྟེ།</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
|
@ -0,0 +1,215 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1">
|
||||||
|
<context>
|
||||||
|
<name>AptProxyDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="24"/>
|
||||||
|
<source>Set Apt Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="41"/>
|
||||||
|
<source>Server Address</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="59"/>
|
||||||
|
<source>Port</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="80"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="84"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>Proxy</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="63"/>
|
||||||
|
<source>Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="194"/>
|
||||||
|
<source>Start using</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="207"/>
|
||||||
|
<source>Proxy mode</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="211"/>
|
||||||
|
<source>Auto</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="214"/>
|
||||||
|
<source>Manual</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="369"/>
|
||||||
|
<source>Application Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="444"/>
|
||||||
|
<source>System Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="446"/>
|
||||||
|
<source>Auto url</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
<extra-contents_path>/Proxy/Auto url</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="448"/>
|
||||||
|
<source>Http Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
<extra-contents_path>/Proxy/Http Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="450"/>
|
||||||
|
<source>Https Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
<extra-contents_path>/Proxy/Https Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="452"/>
|
||||||
|
<source>Ftp Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
<extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="454"/>
|
||||||
|
<source>Socks Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
<extra-contents_path>/Proxy/Socks Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="455"/>
|
||||||
|
<location filename="../proxy.cpp" line="456"/>
|
||||||
|
<location filename="../proxy.cpp" line="457"/>
|
||||||
|
<location filename="../proxy.cpp" line="458"/>
|
||||||
|
<location filename="../proxy.cpp" line="1047"/>
|
||||||
|
<source>Port</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="459"/>
|
||||||
|
<source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="462"/>
|
||||||
|
<source>Apt Proxy</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
<extra-contents_path>/Proxy/Apt Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="463"/>
|
||||||
|
<location filename="../proxy.cpp" line="984"/>
|
||||||
|
<source>Open</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="464"/>
|
||||||
|
<source>Server Address : </source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="465"/>
|
||||||
|
<source>Port : </source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="466"/>
|
||||||
|
<source>Edit</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="564"/>
|
||||||
|
<source>The apt proxy has been turned off and needs to be restarted to take effect</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="565"/>
|
||||||
|
<location filename="../proxy.cpp" line="797"/>
|
||||||
|
<source>Reboot Later</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="566"/>
|
||||||
|
<location filename="../proxy.cpp" line="798"/>
|
||||||
|
<source>Reboot Now</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="796"/>
|
||||||
|
<source>The system needs to be restarted to set the Apt proxy, whether to reboot</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="996"/>
|
||||||
|
<source>Proxy type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1013"/>
|
||||||
|
<source>IP address</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1019"/>
|
||||||
|
<location filename="../proxy.cpp" line="1050"/>
|
||||||
|
<source>Required</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1040"/>
|
||||||
|
<source>Invalid IP Address</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1061"/>
|
||||||
|
<source>Username</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1064"/>
|
||||||
|
<location filename="../proxy.cpp" line="1078"/>
|
||||||
|
<source>Optional</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1074"/>
|
||||||
|
<source>Password</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1097"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1098"/>
|
||||||
|
<source>Save</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1160"/>
|
||||||
|
<source>The following applications are allowed to use this configuration:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
Binary file not shown.
|
@ -0,0 +1,215 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="zh_CN">
|
||||||
|
<context>
|
||||||
|
<name>AptProxyDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="24"/>
|
||||||
|
<source>Set Apt Proxy</source>
|
||||||
|
<translation>设置APT代理</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="41"/>
|
||||||
|
<source>Server Address</source>
|
||||||
|
<translation>服务器地址</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="59"/>
|
||||||
|
<source>Port</source>
|
||||||
|
<translation>端口</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="80"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation>取消</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aptproxydialog.cpp" line="84"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation>确定</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>Proxy</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="63"/>
|
||||||
|
<source>Proxy</source>
|
||||||
|
<translation>代理</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="194"/>
|
||||||
|
<source>Start using</source>
|
||||||
|
<translation>启用</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="207"/>
|
||||||
|
<source>Proxy mode</source>
|
||||||
|
<translation>代理类型</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="211"/>
|
||||||
|
<source>Auto</source>
|
||||||
|
<translation>自动</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="214"/>
|
||||||
|
<source>Manual</source>
|
||||||
|
<translation>手动</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="369"/>
|
||||||
|
<source>Application Proxy</source>
|
||||||
|
<translation>应用代理</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="444"/>
|
||||||
|
<source>System Proxy</source>
|
||||||
|
<translation>系统代理</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="446"/>
|
||||||
|
<source>Auto url</source>
|
||||||
|
<translation>配置URL</translation>
|
||||||
|
<extra-contents_path>/Proxy/Auto url</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="448"/>
|
||||||
|
<source>Http Proxy</source>
|
||||||
|
<translation>HTTP代理</translation>
|
||||||
|
<extra-contents_path>/Proxy/Http Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="450"/>
|
||||||
|
<source>Https Proxy</source>
|
||||||
|
<translation>HTTPS代理</translation>
|
||||||
|
<extra-contents_path>/Proxy/Https Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="452"/>
|
||||||
|
<source>Ftp Proxy</source>
|
||||||
|
<translation>FTP代理</translation>
|
||||||
|
<extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="454"/>
|
||||||
|
<source>Socks Proxy</source>
|
||||||
|
<translation>SOCKS代理</translation>
|
||||||
|
<extra-contents_path>/Proxy/Socks Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="455"/>
|
||||||
|
<location filename="../proxy.cpp" line="456"/>
|
||||||
|
<location filename="../proxy.cpp" line="457"/>
|
||||||
|
<location filename="../proxy.cpp" line="458"/>
|
||||||
|
<location filename="../proxy.cpp" line="1047"/>
|
||||||
|
<source>Port</source>
|
||||||
|
<translation>端口</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="459"/>
|
||||||
|
<source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source>
|
||||||
|
<translation>忽略的主机列表,请使用英文分号(;)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="462"/>
|
||||||
|
<source>Apt Proxy</source>
|
||||||
|
<translation>APT代理</translation>
|
||||||
|
<extra-contents_path>/Proxy/Apt Proxy</extra-contents_path>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="463"/>
|
||||||
|
<location filename="../proxy.cpp" line="984"/>
|
||||||
|
<source>Open</source>
|
||||||
|
<translation>开启</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="464"/>
|
||||||
|
<source>Server Address : </source>
|
||||||
|
<translation>服务器地址: </translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="465"/>
|
||||||
|
<source>Port : </source>
|
||||||
|
<translation>端口: </translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="466"/>
|
||||||
|
<source>Edit</source>
|
||||||
|
<translation>编辑</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="564"/>
|
||||||
|
<source>The apt proxy has been turned off and needs to be restarted to take effect</source>
|
||||||
|
<translation>APT代理已关闭,需要重启才能生效</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="565"/>
|
||||||
|
<location filename="../proxy.cpp" line="797"/>
|
||||||
|
<source>Reboot Later</source>
|
||||||
|
<translation>稍后重启</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="566"/>
|
||||||
|
<location filename="../proxy.cpp" line="798"/>
|
||||||
|
<source>Reboot Now</source>
|
||||||
|
<translation>立即重启</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="796"/>
|
||||||
|
<source>The system needs to be restarted to set the Apt proxy, whether to reboot</source>
|
||||||
|
<translation>设置APT代理需要重启系统后生效,是否重启系统</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="996"/>
|
||||||
|
<source>Proxy type</source>
|
||||||
|
<translation>代理类型</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1013"/>
|
||||||
|
<source>IP address</source>
|
||||||
|
<translation>IP地址</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1019"/>
|
||||||
|
<location filename="../proxy.cpp" line="1050"/>
|
||||||
|
<source>Required</source>
|
||||||
|
<translation>必填</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1040"/>
|
||||||
|
<source>Invalid IP Address</source>
|
||||||
|
<translation>无效的IP地址</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1061"/>
|
||||||
|
<source>Username</source>
|
||||||
|
<translation>用户名</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1064"/>
|
||||||
|
<location filename="../proxy.cpp" line="1078"/>
|
||||||
|
<source>Optional</source>
|
||||||
|
<translation>选填</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1074"/>
|
||||||
|
<source>Password</source>
|
||||||
|
<translation>密码</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1097"/>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation>取消</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1098"/>
|
||||||
|
<source>Save</source>
|
||||||
|
<translation>保存</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../proxy.cpp" line="1160"/>
|
||||||
|
<source>The following applications are allowed to use this configuration:</source>
|
||||||
|
<translation>允许以下应用使用该配置:</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
Loading…
Reference in New Issue