mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
21 lines
480 B
C++
21 lines
480 B
C++
|
|
#ifndef MTPROXY_PUBLIC_HOST_INPUT_H
|
||
|
|
#define MTPROXY_PUBLIC_HOST_INPUT_H
|
||
|
|
|
||
|
|
#include <QString>
|
||
|
|
|
||
|
|
#include <QValidator>
|
||
|
|
|
||
|
|
/// Shared rules for public host field (IPv4 dotted partial, IPv6 hex, FQDN ASCII).
|
||
|
|
bool mtproxyPublicHostInputAllowed(const QString &text);
|
||
|
|
|
||
|
|
class PublicHostInputValidator : public QValidator {
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
explicit PublicHostInputValidator(QObject *parent = nullptr);
|
||
|
|
|
||
|
|
QValidator::State validate(QString &input, int &pos) const override;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|