Overte C++ Documentation
NetworkingConstants.h
1 //
2 // NetworkingConstants.h
3 // libraries/networking/src
4 //
5 // Created by Stephen Birarda on 2015-03-31.
6 // Copyright 2015 High Fidelity, Inc.
7 // Copyright 2020 Vircadia contributors.
8 //
9 // Distributed under the Apache License, Version 2.0.
10 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
11 //
12 
13 #ifndef hifi_NetworkingConstants_h
14 #define hifi_NetworkingConstants_h
15 
16 #include <QtCore/QProcessEnvironment>
17 #include <QtCore/QUrl>
18 
19 namespace NetworkingConstants {
20  // If you want to use STAGING instead of STABLE,
21  // links from the Domain Server web interface (like the connect account token generation)
22  // will still point at stable unless you ALSO change the Domain Server Directory Services URL inside of:
23  // <Overte repo>\domain-server\resources\web\js\shared.js
24 
25  // You can avoid changing that and still effectively use a connected domain on staging
26  // if you manually generate a personal access token for the domains scope
27  // at https://staging.highfidelity.com/user/tokens/new?for_domain_server=true
28 
29  const QString WEB_ENGINE_VERSION = "Chrome/83.0.4103.122";
30 
31  // For now we only have one directory server.
32  const QUrl METAVERSE_SERVER_URL_STABLE { "https://mv.overte.org/server" };
33  const QUrl METAVERSE_SERVER_URL_STAGING { "https://mv.overte.org/server" };
34 
35  // Web Engine requests to this parent domain have an account authorization header added
36  const QString AUTH_HOSTNAME_BASE = "overte.org";
37  const QStringList IS_AUTHABLE_HOSTNAME = { "overte.org" };
38 
39  // Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers.
40  const QByteArray OVERTE_USER_AGENT = "Mozilla/5.0 (OverteInterface)";
41 
42  const QString WEB_ENGINE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) " + WEB_ENGINE_VERSION + " Mobile Safari/537.36";
43  const QString MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) " + WEB_ENGINE_VERSION + " Mobile Safari/537.36";
44 
45  // WebEntity Defaults
46  const QString WEB_ENTITY_DEFAULT_SOURCE_URL = "https://overte.org/";
47  const QString WEB_ENTITY_DEFAULT_USER_AGENT = WEB_ENGINE_USER_AGENT;
48 
49  // Builds URLs
50  const QUrl BUILDS_XML_URL("");
51  const QUrl MASTER_BUILDS_XML_URL("");
52 
53  const QString DEFAULT_AVATAR_COLLISION_SOUND_URL = "https://hifi-public.s3.amazonaws.com/sounds/Collisions-otherorganic/Body_Hits_Impact.wav";
54 
55  // CDN URLs
56  const QString HF_CONTENT_CDN_URL = "";
57  const QString HF_MPASSETS_CDN_URL = "";
58  const QString HF_PUBLIC_CDN_URL = "";
59  const QString HF_MARKETPLACE_CDN_HOSTNAME = "";
60  const QString OVERTE_CONTENT_CDN_URL = "https://content.overte.org/";
61  const QString OVERTE_COMMUNITY_APPLICATIONS = { "https://more.overte.org/applications" };
62  const QString OVERTE_TUTORIAL_SCRIPTS = { "https://more.overte.org/tutorial" };
63 
64 #if USE_STABLE_GLOBAL_SERVICES
65  const QString ICE_SERVER_DEFAULT_HOSTNAME = "ice.overte.org";
66 
67  const QString STUN_SERVER_DEFAULT_HOSTNAME = "stun1.l.google.com";
68  const unsigned short STUN_SERVER_DEFAULT_PORT = 19302;
69 #else
70  const QString ICE_SERVER_DEFAULT_HOSTNAME = "ice.overte.org";
71 
72  const QString STUN_SERVER_DEFAULT_HOSTNAME = "stun2.l.google.com";
73  const unsigned short STUN_SERVER_DEFAULT_PORT = 19302;
74 #endif
75 
76  const QUrl HELP_COMMUNITY_URL{ "https://overte.org" };
77  const QUrl HELP_DOCS_URL{ "https://docs.overte.org" };
78  const QUrl HELP_FORUM_URL{ "https://overte.org" };
79  const QUrl HELP_SCRIPTING_REFERENCE_URL{ "https://apidocs.overte.org/" };
80  const QUrl HELP_RELEASE_NOTES_URL{ "https://docs.overte.org/release-notes.html" };
81  const QUrl HELP_BUG_REPORT_URL{ "https://github.com/overte-org/overte/issues" };
82 
83  const QString DEFAULT_OVERTE_ADDRESS = "file:///~/serverless/tutorial.json";
84  const QString DEFAULT_HOME_ADDRESS = "file:///~/serverless/tutorial.json";
85  const QString REDIRECT_HIFI_ADDRESS = "file:///~/serverless/redirect.json";
86 }
87 
88 const QString HIFI_URL_SCHEME_ABOUT = "about";
89 const QString URL_SCHEME_OVERTE = "hifi";
90 const QString URL_SCHEME_OVERTEAPP = "hifiapp";
91 const QString URL_SCHEME_DATA = "data";
92 const QString URL_SCHEME_QRC = "qrc";
93 const QString HIFI_URL_SCHEME_FILE = "file";
94 const QString HIFI_URL_SCHEME_HTTP = "http";
95 const QString HIFI_URL_SCHEME_HTTPS = "https";
96 const QString HIFI_URL_SCHEME_FTP = "ftp";
97 const QString URL_SCHEME_ATP = "atp";
98 
99 #endif // hifi_NetworkingConstants_h