Skip to content

Commit

Permalink
Add quench analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszWojciechO committed Dec 11, 2024
1 parent b558563 commit 8b974f6
Show file tree
Hide file tree
Showing 16 changed files with 131 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ci/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if [[ $tags == *"moose"* ]]; then
-X 'main.EventsDomain=${events_domain:-""}' \
-X 'main.EventsSubdomain=${EVENTS_SUBDOMAIN:-""}'"

source "${WORKDIR}"/ci/add_private_bindings.sh moose/events ./third-party/moose-events/moosenordvpnappgo/v14
source "${WORKDIR}"/ci/add_private_bindings.sh moose/events ./third-party/moose-events/moosenordvpnappgo/v15
source "${WORKDIR}"/ci/add_private_bindings.sh moose/worker ./third-party/moose-worker/mooseworkergo/v14
fi

Expand Down
14 changes: 9 additions & 5 deletions config/protocol.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions daemon/rpc_set_technology.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func (r *RPC) SetTechnology(ctx context.Context, in *pb.SetTechnologyRequest) (*
if in.GetTechnology() == config.Technology_NORDLYNX {
protocol = config.Protocol_UDP
obfuscate = false
} else if in.GetTechnology() == config.Technology_QUENCH {
protocol = config.Protocol_Webtunnel
obfuscate = false
}

if in.GetTechnology() != config.Technology_NORDLYNX && cfg.AutoConnectData.PostquantumVpn {
Expand Down
10 changes: 10 additions & 0 deletions events/moose/moose.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ func (s *Subscriber) NotifyTechnology(data config.Technology) error {
technology = moose.NordvpnappVpnConnectionTechnologyNordlynx
case config.Technology_OPENVPN:
technology = moose.NordvpnappVpnConnectionTechnologyOpenvpn
case config.Technology_QUENCH:
technology = moose.NordvpnappVpnConnectionTechnologyNordwhisper
case config.Technology_UNKNOWN_TECHNOLOGY:
return errors.New("unknown technology")
default:
Expand Down Expand Up @@ -479,6 +481,8 @@ func (s *Subscriber) NotifyConnect(data events.DataConnect) error {
protocol = moose.NordvpnappVpnConnectionProtocolTcp
case config.Protocol_UDP:
protocol = moose.NordvpnappVpnConnectionProtocolUdp
case config.Protocol_Webtunnel:
protocol = moose.NordvpnappVpnConnectionProtocolWebtunnel
case config.Protocol_UNKNOWN_PROTOCOL:
protocol = moose.NordvpnappVpnConnectionProtocolNone
default:
Expand All @@ -491,6 +495,8 @@ func (s *Subscriber) NotifyConnect(data events.DataConnect) error {
technology = moose.NordvpnappVpnConnectionTechnologyOpenvpn
case config.Technology_NORDLYNX:
technology = moose.NordvpnappVpnConnectionTechnologyNordlynx
case config.Technology_QUENCH:
technology = moose.NordvpnappVpnConnectionTechnologyNordwhisper
case config.Technology_UNKNOWN_TECHNOLOGY:
technology = moose.NordvpnappVpnConnectionTechnologyNone
default:
Expand Down Expand Up @@ -574,6 +580,8 @@ func (s *Subscriber) NotifyDisconnect(data events.DataDisconnect) error {
technology = moose.NordvpnappVpnConnectionTechnologyOpenvpn
case config.Technology_NORDLYNX:
technology = moose.NordvpnappVpnConnectionTechnologyNordlynx
case config.Technology_QUENCH:
technology = moose.NordvpnappVpnConnectionTechnologyNordwhisper
case config.Technology_UNKNOWN_TECHNOLOGY:
technology = moose.NordvpnappVpnConnectionTechnologyNone
default:
Expand All @@ -586,6 +594,8 @@ func (s *Subscriber) NotifyDisconnect(data events.DataDisconnect) error {
protocol = moose.NordvpnappVpnConnectionProtocolTcp
case config.Protocol_UDP:
protocol = moose.NordvpnappVpnConnectionProtocolUdp
case config.Protocol_Webtunnel:
protocol = moose.NordvpnappVpnConnectionProtocolWebtunnel
case config.Protocol_UNKNOWN_PROTOCOL:
protocol = moose.NordvpnappVpnConnectionProtocolNone
default:
Expand Down
2 changes: 1 addition & 1 deletion lib-versions.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# shellcheck disable=SC2034 # used in the build process later
LIBTELIO_VERSION=v5.1.4
LIBDROP_VERSION=v8.1.1
LIBMOOSE_NORDVPNAPP_VERSION=v14.3.0-nordVpnApp
LIBMOOSE_NORDVPNAPP_VERSION=v15.0.2-nordVpnApp
LIBMOOSE_WORKER_VERSION=v14.3.0-worker
LIBQUENCH_VERSION=v0.0.16
1 change: 1 addition & 0 deletions protobuf/daemon/config/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ enum Protocol {
UNKNOWN_PROTOCOL = 0;
UDP = 1;
TCP = 2;
Webtunnel = 3;
}
4 changes: 2 additions & 2 deletions test/qa/lib/protobuf/daemon/config/protocol_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions test/qa/lib/protobuf/daemon/config/protocol_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class Protocol(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
UNKNOWN_PROTOCOL: _ClassVar[Protocol]
UDP: _ClassVar[Protocol]
TCP: _ClassVar[Protocol]
Webtunnel: _ClassVar[Protocol]
UNKNOWN_PROTOCOL: Protocol
UDP: Protocol
TCP: Protocol
Webtunnel: Protocol
4 changes: 2 additions & 2 deletions test/qa/lib/protobuf/daemon/config/technology_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions test/qa/lib/protobuf/daemon/config/technology_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class Technology(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
UNKNOWN_TECHNOLOGY: _ClassVar[Technology]
OPENVPN: _ClassVar[Technology]
NORDLYNX: _ClassVar[Technology]
QUENCH: _ClassVar[Technology]
UNKNOWN_TECHNOLOGY: Technology
OPENVPN: Technology
NORDLYNX: Technology
QUENCH: Technology
37 changes: 37 additions & 0 deletions test/qa/lib/protobuf/daemon/quench_hidden_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions test/qa/lib/protobuf/daemon/quench_hidden_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from typing import ClassVar as _ClassVar, Optional as _Optional

DESCRIPTOR: _descriptor.FileDescriptor

class QuenchEnabled(_message.Message):
__slots__ = ("enabled",)
ENABLED_FIELD_NUMBER: _ClassVar[int]
enabled: bool
def __init__(self, enabled: bool = ...) -> None: ...
7 changes: 4 additions & 3 deletions test/qa/lib/protobuf/daemon/service_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/qa/lib/protobuf/daemon/service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import token_pb2 as _token_pb2
import purchase_pb2 as _purchase_pb2
import state_pb2 as _state_pb2
import servers_pb2 as _servers_pb2
import quench_hidden_pb2 as _quench_hidden_pb2
from google.protobuf import descriptor as _descriptor
from typing import ClassVar as _ClassVar

Expand Down
Loading

0 comments on commit 8b974f6

Please sign in to comment.