├── .clang-format ├── .codecov.yml ├── .github └── stale.yml ├── .gitmodules ├── LICENSE ├── NewNode.xcframework ├── Info.plist ├── ios-arm64 │ ├── Headers │ │ ├── NewNode.h │ │ └── module.modulemap │ └── libnewnode.a ├── ios-arm64_x86_64-simulator │ ├── Headers │ │ ├── NewNode.h │ │ └── module.modulemap │ └── libnewnode.a └── ios-x86_64-maccatalyst │ ├── Headers │ ├── NewNode.h │ └── module.modulemap │ └── libnewnode.a ├── Package.swift ├── README.md ├── android.c ├── android ├── build.gradle ├── examples │ ├── WebViewSample │ │ ├── WebViewSample.iml │ │ ├── app │ │ │ ├── app.iml │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── webviewsample │ │ │ │ │ └── MainActivity.java │ │ │ │ └── res │ │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ └── flutter │ │ ├── .metadata │ │ ├── README.md │ │ ├── android │ │ ├── app │ │ │ ├── build.gradle │ │ │ ├── gradle │ │ │ │ └── wrapper │ │ │ │ │ └── gradle-wrapper.properties │ │ │ └── src │ │ │ │ ├── androidTestDebug │ │ │ │ └── java │ │ │ │ │ └── io │ │ │ │ │ └── flutter │ │ │ │ │ └── plugins │ │ │ │ │ └── webviewflutterexample │ │ │ │ │ ├── EmbeddingV1ActivityTest.java │ │ │ │ │ └── MainActivityTest.java │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── flutter │ │ │ │ │ └── plugins │ │ │ │ │ └── webviewflutterexample │ │ │ │ │ └── MainActivity.java │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ └── settings.gradle │ │ ├── assets │ │ └── sample_audio.ogg │ │ ├── ios │ │ ├── Flutter │ │ │ ├── AppFrameworkInfo.plist │ │ │ ├── Debug.xcconfig │ │ │ └── Release.xcconfig │ │ ├── Runner.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Runner │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Assets.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ │ └── LaunchImage.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ └── README.md │ │ │ ├── Base.lproj │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ └── main.m │ │ └── webview_flutter_exampleTests │ │ │ └── Info.plist │ │ ├── lib │ │ └── main.dart │ │ ├── pubspec.yaml │ │ └── test_driver │ │ ├── webview_flutter_e2e.dart │ │ └── webview_flutter_e2e_test.dart ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib-proguard-rules.txt ├── maven.gradle ├── newnode.iml ├── proguard-rules.pro ├── settings.gradle ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── clostra │ │ └── newnode │ │ ├── NewNode.java │ │ └── internal │ │ ├── Bluetooth.java │ │ ├── NearbyHelper.java │ │ ├── NewNode.java │ │ └── PermissionActivity.java └── vpn │ ├── app │ ├── app.iml │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── ic_launcher-playstore.png │ │ ├── java │ │ └── com │ │ │ └── clostra │ │ │ └── newnode │ │ │ └── vpn │ │ │ ├── AnimationGroup.java │ │ │ ├── BlinkAnimation.java │ │ │ ├── FadeAnimation.java │ │ │ ├── InfoFragment.java │ │ │ ├── VpnActivity.java │ │ │ ├── VpnService.java │ │ │ └── statistics │ │ │ └── StatisticsFragment.java │ │ ├── jniLibs │ │ ├── arm64-v8a │ │ │ └── libtun2socks.so │ │ ├── armeabi-v7a │ │ │ └── libtun2socks.so │ │ ├── x86 │ │ │ └── libtun2socks.so │ │ └── x86_64 │ │ │ └── libtun2socks.so │ │ └── res │ │ ├── anim │ │ ├── fade_in.xml │ │ ├── fade_out.xml │ │ ├── inner_rotate.xml │ │ └── outer_rotate.xml │ │ ├── animator │ │ ├── common_text_to_connected.xml │ │ ├── common_text_to_disconnected.xml │ │ ├── status_text_to_connected.xml │ │ └── status_text_to_disconnected.xml │ │ ├── drawable-hdpi │ │ ├── cities_white.png │ │ ├── info_connected_dark.png │ │ ├── info_connected_light.png │ │ ├── info_disconnected.png │ │ ├── map_blue.png │ │ ├── map_dark_grey.png │ │ ├── map_grey.png │ │ ├── newnode_logo_black.png │ │ ├── newnode_logo_white.png │ │ ├── newnode_vpn_logo_black.png │ │ ├── newnode_vpn_logo_blue.png │ │ ├── newnode_vpn_logo_white.png │ │ ├── power_button_con_dark.png │ │ ├── power_button_con_light.png │ │ ├── power_button_dis_dark.png │ │ └── power_button_dis_light.png │ │ ├── drawable-mdpi │ │ ├── cities_white.png │ │ ├── info_connected_dark.png │ │ ├── info_connected_light.png │ │ ├── info_disconnected.png │ │ ├── map_blue.png │ │ ├── map_dark_grey.png │ │ ├── map_grey.png │ │ ├── newnode_logo_black.png │ │ ├── newnode_logo_white.png │ │ ├── newnode_vpn_logo_black.png │ │ ├── newnode_vpn_logo_blue.png │ │ ├── newnode_vpn_logo_white.png │ │ ├── power_button_con_dark.png │ │ ├── power_button_con_light.png │ │ ├── power_button_dis_dark.png │ │ └── power_button_dis_light.png │ │ ├── drawable-night │ │ ├── tr_background.xml │ │ ├── tr_info.xml │ │ ├── tr_map.xml │ │ ├── tr_newnode_logo.xml │ │ └── tr_power_button.xml │ │ ├── drawable-xhdpi │ │ ├── cities_white.png │ │ ├── info_connected_dark.png │ │ ├── info_connected_light.png │ │ ├── info_disconnected.png │ │ ├── map_blue.png │ │ ├── map_dark_grey.png │ │ ├── map_grey.png │ │ ├── newnode_logo_black.png │ │ ├── newnode_logo_white.png │ │ ├── newnode_vpn_logo_black.png │ │ ├── newnode_vpn_logo_blue.png │ │ ├── newnode_vpn_logo_white.png │ │ ├── power_button_con_dark.png │ │ ├── power_button_con_light.png │ │ ├── power_button_dis_dark.png │ │ └── power_button_dis_light.png │ │ ├── drawable-xxhdpi │ │ ├── cities_white.png │ │ ├── info_connected_dark.png │ │ ├── info_connected_light.png │ │ ├── info_disconnected.png │ │ ├── map_blue.png │ │ ├── map_dark_grey.png │ │ ├── map_grey.png │ │ ├── newnode_logo_black.png │ │ ├── newnode_logo_white.png │ │ ├── newnode_vpn_logo_black.png │ │ ├── newnode_vpn_logo_blue.png │ │ ├── newnode_vpn_logo_white.png │ │ ├── power_button_con_dark.png │ │ ├── power_button_con_light.png │ │ ├── power_button_dis_dark.png │ │ └── power_button_dis_light.png │ │ ├── drawable-xxxhdpi │ │ ├── cities_white.png │ │ ├── info_connected_dark.png │ │ ├── info_connected_light.png │ │ ├── info_disconnected.png │ │ ├── map_blue.png │ │ ├── map_dark_grey.png │ │ ├── map_grey.png │ │ ├── newnode_logo_black.png │ │ ├── newnode_logo_white.png │ │ ├── newnode_vpn_logo_black.png │ │ ├── newnode_vpn_logo_blue.png │ │ ├── newnode_vpn_logo_white.png │ │ ├── power_button_con_dark.png │ │ ├── power_button_con_light.png │ │ ├── power_button_dis_dark.png │ │ └── power_button_dis_light.png │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ ├── ic_launcher_foreground.xml │ │ ├── ic_shield_icon.xml │ │ ├── ic_vpn.xml │ │ ├── tr_background.xml │ │ ├── tr_info.xml │ │ ├── tr_map.xml │ │ ├── tr_newnode_logo.xml │ │ └── tr_power_button.xml │ │ ├── font │ │ └── inter_bold.xml │ │ ├── layout │ │ ├── info_fragment.xml │ │ ├── main.xml │ │ └── stats_fragment.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night-v23 │ │ └── themes.xml │ │ ├── values-night-v27 │ │ └── themes.xml │ │ ├── values-night │ │ └── colors.xml │ │ ├── values-v23 │ │ └── themes.xml │ │ ├── values-v27 │ │ └── themes.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── font_certs.xml │ │ ├── ic_launcher_background.xml │ │ ├── preloaded_fonts.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ └── themes.xml │ │ └── xml │ │ └── data_extraction_rules.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── import-summary.txt │ ├── settings.gradle │ └── vpn.iml ├── android_export_list ├── backtrace.c ├── backtrace.h ├── base64.c ├── base64.h ├── bev_splice.c ├── bev_splice.h ├── bufferevent_utp.c ├── bufferevent_utp.h ├── bugsnag ├── bugsnag_ndk.c ├── bugsnag_ndk.h ├── bugsnag_ndk_report.c ├── bugsnag_ndk_report.h ├── bugsnag_unwind.c ├── bugsnag_unwind.h └── deps │ ├── bugsnag │ ├── bugsnag.h │ ├── report.c │ ├── report.h │ ├── serialize.c │ └── serialize.h │ └── deps │ └── parson │ ├── package.json │ ├── parson.c │ └── parson.h ├── build.android.sh ├── build.apple.sh ├── build.sh ├── clean.sh ├── client.c ├── client_main.c ├── constants.h ├── d2d.c ├── d2d.h ├── dht.c ├── dht.h ├── dns_prefetch.c ├── dns_prefetch.h ├── dns_prefetch_macos.c ├── docs ├── _config.yml ├── index.md └── newnode-spec.md ├── g_https_cb.h ├── hash_table.c ├── hash_table.h ├── http.c ├── http.h ├── https_wget.c ├── icmp_handler.c ├── icmp_handler.h ├── injector.c ├── ios ├── Bluetooth.h ├── Bluetooth.m ├── Framework │ ├── Info.plist │ ├── NewNode-iOS.h │ ├── NewNode.m │ ├── export_list │ └── module.modulemap ├── HTTPSRequest.h ├── HTTPSRequest.m ├── NetService.h ├── NetService.m ├── examples │ └── CustomHTTPProtocol │ │ ├── CustomHTTPProtocol.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── CustomHTTPProtocol │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Core Code │ │ │ ├── CacheStoragePolicy.h │ │ │ ├── CacheStoragePolicy.m │ │ │ ├── CanonicalRequest.h │ │ │ ├── CanonicalRequest.m │ │ │ ├── CustomHTTPProtocol.h │ │ │ ├── CustomHTTPProtocol.m │ │ │ ├── QNSURLSessionDemux.h │ │ │ └── QNSURLSessionDemux.m │ │ ├── CredentialsManager.h │ │ ├── CredentialsManager.m │ │ ├── Icons │ │ │ ├── Icon-72.png │ │ │ ├── Icon-Small-50.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon.png │ │ │ ├── Icon@2x.png │ │ │ └── iTunesArtwork │ │ ├── Info.plist │ │ ├── Launch Screen.storyboard │ │ ├── Main.storyboard │ │ ├── ThreadInfo.h │ │ ├── ThreadInfo.m │ │ ├── WebViewController.h │ │ ├── WebViewController.m │ │ ├── WebViewControllerHTML │ │ │ ├── anchorInstall.html │ │ │ ├── error.html │ │ │ ├── root.html │ │ │ └── spinner.gif │ │ └── main.m │ │ └── Read Me About CustomHTTPProtocol.txt └── vpn │ ├── NewNode VPN.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ ├── NewNode VPN │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── App_Store_1024x1024.png │ │ │ ├── Contents.json │ │ │ ├── iPad_App_76_1x.png │ │ │ ├── iPad_App_76_2x.png │ │ │ ├── iPad_Pro_App_83.5_2x.png │ │ │ ├── iPad_Pro_Notifications_20_1x.png │ │ │ ├── iPad_Pro_Notifications_20_2x.png │ │ │ ├── iPad_Pro_Settings_29_1x.png │ │ │ ├── iPad_Pro_Settings_29_2x.png │ │ │ ├── iPad_Spotlight_40_1x.png │ │ │ ├── iPad_Spotlight_40_2x.png │ │ │ ├── iPhone_App_60_2x.png │ │ │ ├── iPhone_App_60_3x.png │ │ │ ├── iPhone_Notifications_20_2x.png │ │ │ ├── iPhone_Notifications_20_3x.png │ │ │ ├── iPhone_Settings_29_2x.png │ │ │ ├── iPhone_Settings_29_3x.png │ │ │ ├── iPhone_Spotlight_40_2x.png │ │ │ └── iPhone_Spotlight_40_3x.png │ │ ├── Contents.json │ │ ├── cities.imageset │ │ │ ├── Contents.json │ │ │ └── cities_white.png │ │ ├── earth_map_blue.imageset │ │ │ ├── Contents.json │ │ │ └── map_blue.png │ │ ├── earth_map_dark.imageset │ │ │ ├── Contents.json │ │ │ └── map_dark_grey.png │ │ ├── earth_map_gray.imageset │ │ │ ├── Contents.json │ │ │ └── map_grey.png │ │ ├── info_off.imageset │ │ │ ├── Contents.json │ │ │ └── info_colored.svg │ │ ├── info_on.imageset │ │ │ ├── Contents.json │ │ │ └── info_white.svg │ │ ├── inner_arc.imageset │ │ │ ├── Contents.json │ │ │ └── inner_arc.svg │ │ ├── launch_image.imageset │ │ │ ├── Contents.json │ │ │ ├── launch_image_dark.png │ │ │ └── launch_image_light.png │ │ ├── newnode_logo_off.imageset │ │ │ ├── Contents.json │ │ │ ├── newnode_vpn_logo_black.png │ │ │ └── newnode_vpn_logo_white.png │ │ ├── newnode_logo_on.imageset │ │ │ ├── Contents.json │ │ │ └── newnode_vpn_logo_white.png │ │ ├── outer_arc.imageset │ │ │ ├── Contents.json │ │ │ └── outer_arc.svg │ │ ├── power_button_off.imageset │ │ │ ├── Contents.json │ │ │ ├── power_off_dark.svg │ │ │ └── power_off_light.svg │ │ ├── power_button_off_pressed.imageset │ │ │ ├── Contents.json │ │ │ ├── power_off_dark_pressed.svg │ │ │ └── power_off_light_pressed.svg │ │ ├── power_button_on.imageset │ │ │ ├── Contents.json │ │ │ ├── power_on_dark.svg │ │ │ └── power_on_light.svg │ │ └── power_button_on_pressed.imageset │ │ │ ├── Contents.json │ │ │ ├── power_on_dark_pressed.svg │ │ │ └── power_on_light_pressed.svg │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Colors.xcassets │ │ ├── Contents.json │ │ ├── gradient_off1.colorset │ │ │ └── Contents.json │ │ ├── gradient_off2.colorset │ │ │ └── Contents.json │ │ ├── gradient_on1.colorset │ │ │ └── Contents.json │ │ ├── gradient_on2.colorset │ │ │ └── Contents.json │ │ ├── info_bkg.colorset │ │ │ └── Contents.json │ │ ├── info_header.colorset │ │ │ └── Contents.json │ │ ├── info_text.colorset │ │ │ └── Contents.json │ │ ├── status_text_off.colorset │ │ │ └── Contents.json │ │ ├── status_text_on.colorset │ │ │ └── Contents.json │ │ ├── usage_text_off.colorset │ │ │ └── Contents.json │ │ └── usage_text_on.colorset │ │ │ └── Contents.json │ ├── FontUpdater.swift │ ├── GradientView.swift │ ├── Info.plist │ ├── InfoViewController.swift │ ├── Localizable.strings │ ├── NewNode VPN-Bridging-Header.h │ ├── NewNode VPN.entitlements │ ├── SpinnerView.swift │ └── ViewController.swift │ └── Tunnel │ ├── Info.plist │ ├── NewNode-Bridging-Header.h │ ├── PacketTunnelProvider.swift │ └── Tunnel.entitlements ├── khash.h ├── log.c ├── log.h ├── lsd.c ├── lsd.h ├── merkle_tree.c ├── merkle_tree.h ├── network.c ├── network.h ├── newnode.h ├── newnode.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── newnode.xcscheme ├── nn_features.h ├── obfoo.c ├── obfoo.h ├── sha1.c ├── sha1.h ├── stall_detector.c ├── stall_detector.h ├── test.sh ├── thread.c ├── thread.h ├── timer.c ├── timer.h └── ui.h /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # BasedOnStyle: WebKit 3 | AccessModifierOffset: -4 4 | ConstructorInitializerIndentWidth: 4 5 | AlignEscapedNewlinesLeft: false 6 | AlignTrailingComments: false 7 | AllowAllParametersOfDeclarationOnNextLine: true 8 | AllowShortIfStatementsOnASingleLine: false 9 | AllowShortLoopsOnASingleLine: false 10 | AlwaysBreakTemplateDeclarations: false 11 | AlwaysBreakBeforeMultilineStrings: false 12 | BreakBeforeBinaryOperators: false 13 | BreakBeforeBraces: Linux 14 | BreakBeforeTernaryOperators: false 15 | BreakConstructorInitializersBeforeComma: true 16 | BinPackParameters: true 17 | ColumnLimit: 0 18 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 19 | DerivePointerBinding: false 20 | ExperimentalAutoDetectBinPacking: false 21 | IndentCaseLabels: false 22 | MaxEmptyLinesToKeep: 1 23 | NamespaceIndentation: Inner 24 | ObjCSpaceBeforeProtocolList: true 25 | PenaltyBreakBeforeFirstCallParameter: 19 26 | PenaltyBreakComment: 60 27 | PenaltyBreakString: 1000 28 | PenaltyBreakFirstLessLess: 120 29 | PenaltyExcessCharacter: 1000000 30 | PenaltyReturnTypeOnItsOwnLine: 60 31 | PointerBindsToType: true 32 | SpacesBeforeTrailingComments: 1 33 | Cpp11BracedListStyle: false 34 | Standard: Auto 35 | IndentWidth: 4 36 | TabWidth: 4 37 | UseTab: Never 38 | IndentCaseLabels: false 39 | IndentFunctionDeclarationAfterType: false 40 | SpacesInParentheses: false 41 | SpacesInAngles: false 42 | SpaceInEmptyParentheses: false 43 | SpacesInCStyleCastParentheses: false 44 | SpaceAfterControlStatementKeyword: true 45 | SpaceBeforeAssignmentOperators: true 46 | ContinuationIndentWidth: 4 47 | PointerBindsToType: false 48 | ... 49 | 50 | -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: "40...95" 3 | status: 4 | project: 5 | default: 6 | threshold: 2% 7 | patch: 8 | default: 9 | target: 20% 10 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libutp"] 2 | path = libutp 3 | url = https://github.com/clostra/libutp 4 | [submodule "libsodium"] 5 | path = libsodium 6 | url = https://github.com/clostra/libsodium 7 | [submodule "blocksruntime"] 8 | path = blocksruntime 9 | url = https://github.com/mackyle/blocksruntime.git 10 | [submodule "dht"] 11 | path = dht 12 | url = https://github.com/clostra/dht 13 | [submodule "libunwind-ndk"] 14 | path = libunwind-ndk 15 | url = https://github.com/clostra/libunwind-ndk.git 16 | [submodule "bugsnag-cocoa"] 17 | path = bugsnag-cocoa 18 | url = https://github.com/clostra/bugsnag-cocoa 19 | [submodule "libevent"] 20 | path = libevent 21 | url = https://github.com/clostra/libevent 22 | [submodule "ios/NewNode/MMWormhole"] 23 | path = ios/vpn/MMWormhole 24 | url = https://github.com/mutualmobile/MMWormhole.git 25 | [submodule "parson"] 26 | path = parson 27 | url = https://github.com/kgabis/parson 28 | -------------------------------------------------------------------------------- /NewNode.xcframework/ios-arm64/Headers/NewNode.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef bool (^d2dReceivedCallback)(const uint8_t *buf, size_t len, const struct sockaddr *sa, socklen_t salen); 4 | 5 | @interface NewNode : NSObject 6 | 7 | @property (class, readonly) NSDictionary* connectionProxyDictionary; 8 | @property (class) int logLevel; 9 | 10 | @end 11 | 12 | @interface NewNodeExperimental : NSObject 13 | 14 | + (void)setRequestBluetoothPermission:(bool)enabled; 15 | + (void)setRequestDiscoveryPermission:(bool)enabled; 16 | + (void)setD2dReceivedCallback:(d2dReceivedCallback)cb; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /NewNode.xcframework/ios-arm64/Headers/module.modulemap: -------------------------------------------------------------------------------- 1 | module NewNode { 2 | header "NewNode.h" 3 | export * 4 | } 5 | -------------------------------------------------------------------------------- /NewNode.xcframework/ios-arm64/libnewnode.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/NewNode.xcframework/ios-arm64/libnewnode.a -------------------------------------------------------------------------------- /NewNode.xcframework/ios-arm64_x86_64-simulator/Headers/NewNode.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef bool (^d2dReceivedCallback)(const uint8_t *buf, size_t len, const struct sockaddr *sa, socklen_t salen); 4 | 5 | @interface NewNode : NSObject 6 | 7 | @property (class, readonly) NSDictionary* connectionProxyDictionary; 8 | @property (class) int logLevel; 9 | 10 | @end 11 | 12 | @interface NewNodeExperimental : NSObject 13 | 14 | + (void)setRequestBluetoothPermission:(bool)enabled; 15 | + (void)setRequestDiscoveryPermission:(bool)enabled; 16 | + (void)setD2dReceivedCallback:(d2dReceivedCallback)cb; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /NewNode.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap: -------------------------------------------------------------------------------- 1 | module NewNode { 2 | header "NewNode.h" 3 | export * 4 | } 5 | -------------------------------------------------------------------------------- /NewNode.xcframework/ios-arm64_x86_64-simulator/libnewnode.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/NewNode.xcframework/ios-arm64_x86_64-simulator/libnewnode.a -------------------------------------------------------------------------------- /NewNode.xcframework/ios-x86_64-maccatalyst/Headers/NewNode.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef bool (^d2dReceivedCallback)(const uint8_t *buf, size_t len, const struct sockaddr *sa, socklen_t salen); 4 | 5 | @interface NewNode : NSObject 6 | 7 | @property (class, readonly) NSDictionary* connectionProxyDictionary; 8 | @property (class) int logLevel; 9 | 10 | @end 11 | 12 | @interface NewNodeExperimental : NSObject 13 | 14 | + (void)setRequestBluetoothPermission:(bool)enabled; 15 | + (void)setRequestDiscoveryPermission:(bool)enabled; 16 | + (void)setD2dReceivedCallback:(d2dReceivedCallback)cb; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /NewNode.xcframework/ios-x86_64-maccatalyst/Headers/module.modulemap: -------------------------------------------------------------------------------- 1 | module NewNode { 2 | header "NewNode.h" 3 | export * 4 | } 5 | -------------------------------------------------------------------------------- /NewNode.xcframework/ios-x86_64-maccatalyst/libnewnode.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/NewNode.xcframework/ios-x86_64-maccatalyst/libnewnode.a -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | import PackageDescription 3 | let package = Package( 4 | name: "NewNode", 5 | platforms: [ 6 | .iOS(.v13) 7 | ], 8 | products: [ 9 | .library( 10 | name: "NewNode", 11 | targets: ["NewNode"]) 12 | ], 13 | targets: [ 14 | .binaryTarget( 15 | name: "NewNode", 16 | path: "NewNode.xcframework") 17 | ] 18 | ) 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NewNode 2 | 3 | ## Integration status 4 | 5 | [![GitHub release](https://img.shields.io/github/release/clostra/newnode.svg)](https://github.com/clostra/newnode/releases/) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | 8 | ## Android 9 | 10 | Add to your build.gradle: 11 | ```groovy 12 | implementation 'com.clostra.newnode:newnode:+' 13 | ``` 14 | 15 | Add to your Application or Activity: 16 | 17 | ```java 18 | import com.clostra.newnode.NewNode; 19 | 20 | @Override 21 | protected void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | NewNode.init(); 24 | } 25 | ``` 26 | 27 | See [`android/examples/WebViewSample`](https://github.com/clostra/newnode/tree/master/android/examples/WebViewSample) for an example. 28 | 29 | ## iOS 30 | 31 | Add this repo as a Swift Package. 32 | 33 | ObjC: 34 | ```objc 35 | NSURLSessionConfiguration *config = NSURLSessionConfiguration.defaultSessionConfiguration; 36 | config.connectionProxyDictionary = NewNode.connectionProxyDictionary; 37 | NSURLSession *session = [NSURLSession sessionWithConfiguration:config]; 38 | ``` 39 | 40 | Swift: 41 | ```swift 42 | let config = URLSessionConfiguration.default 43 | config.connectionProxyDictionary = NewNode.connectionProxyDictionary 44 | let session = URLSession(configuration: config) 45 | ``` 46 | 47 | See [`ios/examples/CustomHTTPProtocol`](https://github.com/clostra/newnode/tree/master/ios/examples/CustomHTTPProtocol) for an example. 48 | 49 | ## macOS / Linux 50 | 51 | Clone this repo and build NewNode: 52 | ```bash 53 | git clone --recurse-submodules https://github.com/clostra/newnode.git 54 | cd newnode 55 | ./build.sh 56 | ``` 57 | 58 | Then, run it: 59 | ```bash 60 | ./client 61 | ``` 62 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/WebViewSample.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 33 5 | 6 | defaultConfig { 7 | applicationId "com.example.webviewsample" 8 | minSdkVersion 19 9 | targetSdkVersion 33 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(include: ['*.jar'], dir: 'libs') 23 | implementation 'androidx.appcompat:appcompat:1.4.1' 24 | implementation 'com.android.support.constraint:constraint-layout:1.+' 25 | 26 | // include AAR directly (must include dependencies) 27 | releaseImplementation files('../../../build/outputs/aar/newnode-release.aar') 28 | debugImplementation files('../../../build/outputs/aar/newnode-debug.aar') 29 | implementation 'com.bugsnag:bugsnag-android:4.7.0' 30 | implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' 31 | implementation 'androidx.appcompat:appcompat:1.5.0' 32 | implementation 'com.google.android.gms:play-services-nearby:18.3.0' 33 | 34 | // use mavenCentral 35 | //implementation 'com.clostra.newnode:newnode:+' 36 | } 37 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/opt/android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 22 | 23 | 33 | 34 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | WebViewSample 3 | 4 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.2' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | } 19 | 20 | task clean(type: Delete) { 21 | delete rootProject.buildDir 22 | } 23 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | android.useAndroidX=true 20 | android.enableJetifier=true 21 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/WebViewSample/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/examples/WebViewSample/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /android/examples/WebViewSample/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':newnode' 2 | -------------------------------------------------------------------------------- /android/examples/flutter/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 1e5cb2d87f8542f9fbbd0f22d528823274be0acb 8 | channel: master 9 | -------------------------------------------------------------------------------- /android/examples/flutter/README.md: -------------------------------------------------------------------------------- 1 | # webview_flutter_example 2 | 3 | Demonstrates how to use the webview_flutter plugin. 4 | 5 | ## Getting Started 6 | 7 | For help getting started with Flutter, view our online 8 | [documentation](https://flutter.io/). 9 | -------------------------------------------------------------------------------- /android/examples/flutter/android/app/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/androidTestDebug/java/io/flutter/plugins/webviewflutterexample/EmbeddingV1ActivityTest.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins.webviewflutterexample; 2 | 3 | import androidx.test.rule.ActivityTestRule; 4 | import dev.flutter.plugins.e2e.FlutterRunner; 5 | import org.junit.Rule; 6 | import org.junit.runner.RunWith; 7 | 8 | @RunWith(FlutterRunner.class) 9 | public class EmbeddingV1ActivityTest { 10 | @Rule 11 | public ActivityTestRule rule = 12 | new ActivityTestRule<>(EmbeddingV1Activity.class); 13 | } 14 | -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/androidTestDebug/java/io/flutter/plugins/webviewflutterexample/MainActivityTest.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins.webviewflutterexample; 2 | 3 | import androidx.test.rule.ActivityTestRule; 4 | import dev.flutter.plugins.e2e.FlutterRunner; 5 | import io.flutter.embedding.android.FlutterActivity; 6 | import org.junit.Rule; 7 | import org.junit.runner.RunWith; 8 | 9 | @RunWith(FlutterRunner.class) 10 | public class MainActivityTest { 11 | @Rule 12 | public ActivityTestRule rule = new ActivityTestRule<>(FlutterActivity.class); 13 | } 14 | -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 14 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/java/io/flutter/plugins/webviewflutterexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins.webviewflutterexample; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.embedding.android.FlutterActivity; 5 | import com.clostra.newnode.NewNode; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | NewNode.init(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/examples/flutter/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/examples/flutter/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:7.2.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/examples/flutter/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /android/examples/flutter/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/examples/flutter/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android/examples/flutter/assets/sample_audio.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/assets/sample_audio.ogg -------------------------------------------------------------------------------- /android/examples/flutter/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | #import 7 | 8 | @interface AppDelegate : FlutterAppDelegate 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "AppDelegate.h" 6 | #include "GeneratedPluginRegistrant.h" 7 | 8 | @implementation AppDelegate 9 | 10 | - (BOOL)application:(UIApplication *)application 11 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 12 | [GeneratedPluginRegistrant registerWithRegistry:self]; 13 | // Override point for customization after application launch. 14 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | webview_flutter_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | io.flutter.embedded_views_preview 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | #import 7 | #import "AppDelegate.h" 8 | 9 | int main(int argc, char* argv[]) { 10 | @autoreleasepool { 11 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/examples/flutter/ios/webview_flutter_exampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /android/examples/flutter/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: webview_flutter_example 2 | description: Demonstrates how to use the webview_flutter plugin. 3 | 4 | environment: 5 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 6 | 7 | dependencies: 8 | flutter: 9 | sdk: flutter 10 | webview_flutter: 11 | 12 | dev_dependencies: 13 | flutter_test: 14 | sdk: flutter 15 | flutter_driver: 16 | sdk: flutter 17 | e2e: "^0.2.0" 18 | pedantic: ^1.8.0 19 | 20 | flutter: 21 | uses-material-design: true 22 | assets: 23 | - assets/sample_audio.ogg 24 | -------------------------------------------------------------------------------- /android/examples/flutter/test_driver/webview_flutter_e2e_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2019, the Chromium project authors. Please see the AUTHORS file 2 | // for details. All rights reserved. Use of this source code is governed by a 3 | // BSD-style license that can be found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | import 'dart:io'; 7 | 8 | import 'package:flutter_driver/flutter_driver.dart'; 9 | 10 | Future main() async { 11 | final FlutterDriver driver = await FlutterDriver.connect(); 12 | final String result = 13 | await driver.requestData(null, timeout: const Duration(minutes: 1)); 14 | await driver.close(); 15 | exit(result == 'pass' ? 0 : 1); 16 | } 17 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED 2 | 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | 6 | GROUP=com.clostra.newnode 7 | POM_ARTIFACT_ID=newnode 8 | 9 | POM_NAME=NewNode 10 | POM_DESCRIPTION=Decentralized Content Distribution Network 11 | POM_URL=https://newnode.com 12 | 13 | POM_LICENSE_NAME=GPL-2.0 14 | POM_LICENSE_URL=https://opensource.org/licenses/GPL-2.0 15 | POM_LICENSE_DIST=repo 16 | 17 | POM_SCM_URL=https://github.com/clostra/newnode 18 | 19 | POM_DEVELOPER_ID=clostra 20 | POM_DEVELOPER_NAME=Clostra 21 | POM_DEVELOPER_URL=https://github.com/clostra/ 22 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /android/lib-proguard-rules.txt: -------------------------------------------------------------------------------- 1 | -keep class com.bugsnag.** { *; } 2 | -keep class com.clostra.** { *; } 3 | -keep class com.google.android.** { *; } -------------------------------------------------------------------------------- /android/maven.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.github.dcendents.android-maven' 2 | 3 | group = 'com.clostra.newnode' 4 | 5 | install.repositories.mavenInstaller.pom.project { 6 | packaging 'aar' 7 | groupId group 8 | artifactId 'newnode' 9 | 10 | name 'newnode' 11 | description 'Decentralized Content Distribution Network' 12 | url 'https://github.com/clostra/newnode' 13 | 14 | licenses { 15 | license { 16 | name 'GNU General Public License version 2' 17 | url 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html' 18 | } 19 | } 20 | developers { 21 | developer { 22 | id 'clostra' 23 | name 'Clostra' 24 | email 'contact@clostra.com' 25 | } 26 | } 27 | scm { 28 | connection 'https://github.com/clostra/newnode.git' 29 | developerConnection 'https://github.com/clostra/newnode.git' 30 | url 'https://github.com/clostra/newnode' 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /android/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/opt/android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'newnode' 2 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/java/com/clostra/newnode/vpn/AnimationGroup.java: -------------------------------------------------------------------------------- 1 | package com.clostra.newnode.vpn; 2 | 3 | import android.animation.AnimatorInflater; 4 | import android.animation.AnimatorSet; 5 | import android.content.Context; 6 | import android.view.View; 7 | 8 | import androidx.annotation.AnimatorRes; 9 | 10 | import java.util.ArrayList; 11 | 12 | public class AnimationGroup { 13 | @AnimatorRes 14 | private final int forwardAnimatorId; 15 | @AnimatorRes private final int backwardAnimatorId; 16 | private final Context context; 17 | private final ArrayList forwardAnimators = new ArrayList<>(); 18 | private final ArrayList backwardAnimators = new ArrayList<>(); 19 | 20 | public AnimationGroup(Context context, @AnimatorRes int forwardAnimatorId, @AnimatorRes int backwardAnimatorId) { 21 | this.context = context; 22 | this.forwardAnimatorId = forwardAnimatorId; 23 | this.backwardAnimatorId = backwardAnimatorId; 24 | } 25 | 26 | public void addTarget(View target) { 27 | AnimatorSet forward = (AnimatorSet) AnimatorInflater.loadAnimator(context, forwardAnimatorId); 28 | forward.setTarget(target); 29 | forwardAnimators.add(forward); 30 | 31 | AnimatorSet backward = (AnimatorSet) AnimatorInflater.loadAnimator(context, backwardAnimatorId); 32 | backward.setTarget(target); 33 | backwardAnimators.add(backward); 34 | } 35 | 36 | public void forward() { 37 | for (AnimatorSet animatorSet : forwardAnimators) { 38 | animatorSet.start(); 39 | } 40 | } 41 | 42 | public void backward() { 43 | for (AnimatorSet animatorSet : backwardAnimators) { 44 | animatorSet.start(); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/java/com/clostra/newnode/vpn/BlinkAnimation.java: -------------------------------------------------------------------------------- 1 | package com.clostra.newnode.vpn; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.animation.Animation; 6 | import android.view.animation.AnimationUtils; 7 | 8 | public class BlinkAnimation { 9 | private final View view; 10 | private final Animation fadeIn; 11 | private final Animation fadeOut; 12 | 13 | BlinkAnimation(Context context, View view, Runnable onFadeOutEnd) { 14 | this.view = view; 15 | 16 | fadeIn = AnimationUtils.loadAnimation(context, R.anim.fade_in); 17 | fadeIn.setDuration(500); 18 | fadeOut = AnimationUtils.loadAnimation(context, R.anim.fade_out); 19 | fadeOut.setDuration(500); 20 | 21 | fadeIn.setAnimationListener(new Animation.AnimationListener() { 22 | @Override 23 | public void onAnimationStart(Animation animation) {} 24 | 25 | @Override 26 | public void onAnimationEnd(Animation animation) { 27 | } 28 | 29 | @Override 30 | public void onAnimationRepeat(Animation animation) {} 31 | }); 32 | 33 | fadeOut.setAnimationListener(new Animation.AnimationListener() { 34 | @Override 35 | public void onAnimationStart(Animation animation) {} 36 | 37 | @Override 38 | public void onAnimationEnd(Animation animation) { 39 | onFadeOutEnd.run(); 40 | view.startAnimation(fadeIn); 41 | } 42 | 43 | @Override 44 | public void onAnimationRepeat(Animation animation) {} 45 | }); 46 | } 47 | 48 | public void start() { 49 | view.startAnimation(fadeOut); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/java/com/clostra/newnode/vpn/InfoFragment.java: -------------------------------------------------------------------------------- 1 | package com.clostra.newnode.vpn; 2 | 3 | import android.os.Bundle; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | 8 | import androidx.annotation.NonNull; 9 | import androidx.annotation.Nullable; 10 | import androidx.fragment.app.Fragment; 11 | 12 | public class InfoFragment extends Fragment { 13 | public InfoFragment() { 14 | super(R.layout.info_fragment); 15 | } 16 | 17 | @Nullable 18 | @Override 19 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 20 | 21 | View view = inflater.inflate(R.layout.info_fragment, container, false); 22 | 23 | view.setOnClickListener(v -> getParentFragmentManager().beginTransaction().remove(this).commit()); 24 | 25 | return view; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/jniLibs/arm64-v8a/libtun2socks.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/jniLibs/arm64-v8a/libtun2socks.so -------------------------------------------------------------------------------- /android/vpn/app/src/main/jniLibs/armeabi-v7a/libtun2socks.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/jniLibs/armeabi-v7a/libtun2socks.so -------------------------------------------------------------------------------- /android/vpn/app/src/main/jniLibs/x86/libtun2socks.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/jniLibs/x86/libtun2socks.so -------------------------------------------------------------------------------- /android/vpn/app/src/main/jniLibs/x86_64/libtun2socks.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/jniLibs/x86_64/libtun2socks.so -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/anim/fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/anim/fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/anim/inner_rotate.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 12 | 13 | 21 | 22 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/anim/outer_rotate.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 12 | 13 | 21 | 22 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/animator/common_text_to_connected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/animator/common_text_to_disconnected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/animator/status_text_to_connected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/animator/status_text_to_disconnected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/cities_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/cities_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/info_connected_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/info_connected_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/info_connected_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/info_connected_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/info_disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/info_disconnected.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/map_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/map_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/map_dark_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/map_dark_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/map_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/map_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/newnode_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/newnode_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/newnode_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/newnode_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/newnode_vpn_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/newnode_vpn_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/newnode_vpn_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/newnode_vpn_logo_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/newnode_vpn_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/newnode_vpn_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/power_button_con_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/power_button_con_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/power_button_con_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/power_button_con_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/power_button_dis_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/power_button_dis_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-hdpi/power_button_dis_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-hdpi/power_button_dis_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/cities_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/cities_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/info_connected_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/info_connected_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/info_connected_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/info_connected_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/info_disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/info_disconnected.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/map_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/map_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/map_dark_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/map_dark_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/map_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/map_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/newnode_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/newnode_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/newnode_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/newnode_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/newnode_vpn_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/newnode_vpn_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/newnode_vpn_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/newnode_vpn_logo_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/newnode_vpn_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/newnode_vpn_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/power_button_con_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/power_button_con_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/power_button_con_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/power_button_con_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/power_button_dis_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/power_button_dis_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-mdpi/power_button_dis_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-mdpi/power_button_dis_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-night/tr_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-night/tr_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-night/tr_map.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-night/tr_newnode_logo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-night/tr_power_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/cities_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/cities_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/info_connected_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/info_connected_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/info_connected_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/info_connected_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/info_disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/info_disconnected.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/map_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/map_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/map_dark_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/map_dark_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/map_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/map_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/newnode_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/newnode_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/newnode_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/newnode_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/newnode_vpn_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/newnode_vpn_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/newnode_vpn_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/newnode_vpn_logo_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/newnode_vpn_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/newnode_vpn_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/power_button_con_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/power_button_con_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/power_button_con_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/power_button_con_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/power_button_dis_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/power_button_dis_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xhdpi/power_button_dis_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xhdpi/power_button_dis_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/cities_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/cities_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/info_connected_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/info_connected_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/info_connected_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/info_connected_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/info_disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/info_disconnected.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/map_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/map_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/map_dark_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/map_dark_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/map_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/map_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/newnode_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/newnode_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/newnode_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/newnode_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/newnode_vpn_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/newnode_vpn_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/newnode_vpn_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/newnode_vpn_logo_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/newnode_vpn_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/newnode_vpn_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/power_button_con_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/power_button_con_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/power_button_con_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/power_button_con_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/power_button_dis_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/power_button_dis_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxhdpi/power_button_dis_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxhdpi/power_button_dis_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/cities_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/cities_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/info_connected_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/info_connected_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/info_connected_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/info_connected_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/info_disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/info_disconnected.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/map_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/map_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/map_dark_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/map_dark_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/map_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/map_grey.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_vpn_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_vpn_logo_black.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_vpn_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_vpn_logo_blue.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_vpn_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/newnode_vpn_logo_white.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_con_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_con_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_con_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_con_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_dis_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_dis_dark.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_dis_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/drawable-xxxhdpi/power_button_dis_light.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 7 | 9 | 10 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable/ic_vpn.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable/tr_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable/tr_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable/tr_map.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable/tr_newnode_logo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/drawable/tr_power_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/font/inter_bold.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/layout/stats_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 23 | 24 | 31 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values-night-v23/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values-night-v27/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/nn_vpn_black 4 | @color/nn_vpn_orange 5 | @color/text_light_gray 6 | @color/nn_text_connected_dark 7 | @color/nn_text_connected_dark 8 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values-v23/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values-v27/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #00000000 4 | #ffffff 5 | #1F2A92 6 | #D1EAFF 7 | #212121 8 | #C8C8C8 9 | 10 | #ffffff 11 | #000000 12 | #FF7833 13 | 14 | #1994FF 15 | @color/nn_vpn_white 16 | @color/nn_vpn_black 17 | @color/nn_vpn_black 18 | 19 | #D1EAFF 20 | #A0A0A0 21 | #F5F5F5 22 | #A0A0A0 23 | 24 | @color/nn_vpn_white 25 | @color/nn_vpn_orange 26 | @color/text_dark_gray 27 | @color/nn_text_connected_light 28 | @color/nn_vpn_white 29 | 30 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values/preloaded_fonts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @font/inter_bold 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | NewNode VPN 3 | 4 | Connecting… 5 | Connected 6 | Disconnected 7 | tap to connect to NewNode\u00A0VPN 8 | tap to disconnect 9 | How NewNode Works 10 | USAGE 11 | Direct: %1$s 12 | Through peers: %1$s 13 | NewNode VPN uses a peer to peer network to get around blocking and to establish a good internet connection when connectivity is sparse. 14 | \n\n 15 | NewNode VPN sends your traffic through a peer network that makes connections through user devices rather than relying on a central server. This, along with encrypting and obfuscating the traffic, makes NewNode very robust at content access. 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /android/vpn/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/vpn/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.2' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | } 19 | 20 | task clean(type: Delete) { 21 | delete rootProject.buildDir 22 | } 23 | -------------------------------------------------------------------------------- /android/vpn/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | android.useAndroidX=true 20 | android.enableJetifier=true 21 | -------------------------------------------------------------------------------- /android/vpn/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/android/vpn/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/vpn/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /android/vpn/import-summary.txt: -------------------------------------------------------------------------------- 1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY 2 | ====================================== 3 | 4 | Ignored Files: 5 | -------------- 6 | The following files were *not* copied into the new Gradle project; you 7 | should evaluate whether these are still needed in your project and if 8 | so manually move them: 9 | 10 | * Android.bp 11 | * _index.html 12 | 13 | Moved Files: 14 | ------------ 15 | Android Gradle projects use a different directory structure than ADT 16 | Eclipse projects. Here's how the projects were restructured: 17 | 18 | * AndroidManifest.xml => app/src/main/AndroidManifest.xml 19 | * res/ => app/src/main/res/ 20 | * src/ => app/src/main/java/ 21 | 22 | Next Steps: 23 | ----------- 24 | You can now build the project. The Gradle project needs network 25 | connectivity to download dependencies. 26 | 27 | Bugs: 28 | ----- 29 | If for some reason your project does not build, and you determine that 30 | it is due to a bug or limitation of the Eclipse to Gradle importer, 31 | please file a bug at http://b.android.com with category 32 | Component-Tools. 33 | 34 | (This import summary is for your information only, and can be deleted 35 | after import once you are satisfied with the results.) 36 | -------------------------------------------------------------------------------- /android/vpn/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':newnode' -------------------------------------------------------------------------------- /android/vpn/vpn.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /android_export_list: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | newnode_init; 4 | Java_com_clostra_dcdn_Dcdn_setCacheDir; 5 | Java_com_clostra_newnode_NewNode_setCacheDir; 6 | Java_com_clostra_newnode_NewNode_updateBugsnagDetails; 7 | local: *; # hide everything else 8 | }; 9 | -------------------------------------------------------------------------------- /backtrace.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | void print_trace(void); 5 | void backtrace_thread(pthread_t thread); 6 | -------------------------------------------------------------------------------- /base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Base64 encoding/decoding (RFC1341) 3 | * Copyright (c) 2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef __BASE64_H__ 10 | #define __BASE64_H__ 11 | 12 | 13 | #define DIV_ROUND_UP(x, n) ((x + (n - 1)) / n) 14 | #define BASE64_LENGTH(x) DIV_ROUND_UP(x * 4, 3) 15 | 16 | char* base64_encode(const unsigned char *src, size_t len, size_t *out_len); 17 | char* base64_urlsafe_encode(const unsigned char *src, size_t len, size_t *out_len); 18 | unsigned char* base64_decode(const char *src, size_t len, size_t *out_len); 19 | 20 | #endif /* __BASE64_H__ */ 21 | -------------------------------------------------------------------------------- /bev_splice.h: -------------------------------------------------------------------------------- 1 | #ifndef __BEV_SPLICE_H__ 2 | #define __BEV_SPLICE_H__ 3 | 4 | #include "network.h" 5 | 6 | 7 | void bev_splice(bufferevent *bev, bufferevent *other); 8 | 9 | #endif // __BEV_SPLICE_H__ 10 | -------------------------------------------------------------------------------- /bufferevent_utp.h: -------------------------------------------------------------------------------- 1 | #ifndef __BUFFEREVENT_UTP_H__ 2 | #define __BUFFEREVENT_UTP_H__ 3 | 4 | #include "libevent/bufferevent-internal.h" 5 | 6 | 7 | uint64 utp_on_error(utp_callback_arguments *a); 8 | uint64 utp_on_read(utp_callback_arguments *a); 9 | uint64 utp_on_state_change(utp_callback_arguments *a); 10 | 11 | extern const struct bufferevent_ops bufferevent_ops_utp; 12 | 13 | #define BEV_IS_UTP(bevp) ((bevp)->be_ops == &bufferevent_ops_utp) 14 | 15 | struct bufferevent * 16 | bufferevent_utp_new(struct event_base *base, utp_context *utp_ctx, utp_socket *utp, int options); 17 | int 18 | bufferevent_utp_connect(struct bufferevent *bev, const struct sockaddr *sa, int socklen); 19 | 20 | utp_socket* bufferevent_get_utp(const struct bufferevent *bev); 21 | 22 | #endif // __BUFFEREVENT_UTP_H__ 23 | -------------------------------------------------------------------------------- /bugsnag/bugsnag_ndk_report.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Dave Perryman on 04/10/2016. 3 | // 4 | 5 | #ifndef BUGSNAGNDK_REPORT_H 6 | #define BUGSNAGNDK_REPORT_H 7 | 8 | #include "bugsnag_ndk.h" 9 | #include "deps/bugsnag/bugsnag.h" 10 | 11 | struct bugsnag_ndk_string_array { 12 | const char **values; 13 | int size; 14 | }; 15 | 16 | struct bugsnag_ndk_report { 17 | char *error_store_path; 18 | struct bugsnag_ndk_string_array notify_release_stages; 19 | struct bugsnag_ndk_string_array filters; 20 | bugsnag_report *report; 21 | bsg_event *event; 22 | bsg_exception *exception; 23 | }; 24 | 25 | char *bsg_load_error_store_path(JNIEnv *env); 26 | void bsg_load_release_stages(JNIEnv *env, struct bugsnag_ndk_report *report); 27 | void bsg_load_filters(JNIEnv *env, struct bugsnag_ndk_report *report); 28 | 29 | void bsg_populate_event_details(JNIEnv *env, struct bugsnag_ndk_report *report); 30 | void bsg_populate_user_details(JNIEnv *env, bsg_event *event); 31 | void bsg_populate_app_data(JNIEnv *env,bsg_event *event); 32 | void bsg_populate_device_data(JNIEnv *env, bsg_event *event); 33 | void bsg_populate_context(JNIEnv *env, bsg_event *event); 34 | void bsg_populate_breadcrumbs(JNIEnv *env, bsg_event *event); 35 | void bsg_populate_meta_data(JNIEnv *env, bsg_event *event, struct bugsnag_ndk_string_array *filters); 36 | 37 | void bsg_set_user(JNIEnv *env, char* id, char* email, char* name); 38 | void bsg_leave_breadcrumb(JNIEnv *env, char *name, bsg_breadcrumb_t type); 39 | void bsg_add_string_to_tab(JNIEnv *env, char *tab, char *key, char* value); 40 | void bsg_add_number_to_tab(JNIEnv *env, char *tab, char *key, double value); 41 | void bsg_add_boolean_to_tab(JNIEnv *env, char *tab, char *key, int value); 42 | 43 | #endif //BUGSNAGNDK_REPORT_H 44 | -------------------------------------------------------------------------------- /bugsnag/bugsnag_unwind.h: -------------------------------------------------------------------------------- 1 | #ifndef NDKTEST_UNWIND_H 2 | #define NDKTEST_UNWIND_H 3 | 4 | #include 5 | #include 6 | #include "bugsnag_ndk.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "deps/bugsnag/bugsnag.h" 14 | #include "deps/bugsnag/report.h" 15 | 16 | /* The number of works to look through to find the next program counter */ 17 | #define WORDS_TO_SCAN 40 18 | 19 | /* Structure to store unwound frame */ 20 | typedef struct unwind_struct_frame { 21 | void *frame_pointer; 22 | char file[1024]; 23 | char method[1024]; 24 | } unwind_struct_frame; 25 | 26 | /* Structure to store unwound frames */ 27 | typedef struct unwind_struct { 28 | unwind_struct_frame frames[BUGSNAG_FRAMES_MAX]; 29 | } unwind_struct; 30 | 31 | typedef struct { 32 | uintptr_t absolute_pc; 33 | uintptr_t stack_top; 34 | size_t stack_size; 35 | } backtrace_frame_t; 36 | 37 | typedef struct { 38 | uintptr_t relative_pc; 39 | uintptr_t relative_symbol_addr; 40 | char* map_name; 41 | char* symbol_name; 42 | char* demangled_name; 43 | } backtrace_symbol_t; 44 | 45 | /* Extracted from Android's include/corkscrew/backtrace.h */ 46 | typedef struct map_info_t map_info_t; 47 | 48 | extern int bugsnag_unwind_stack(unwind_struct* unwind, int max_depth, struct siginfo* si, void* sc); 49 | 50 | extern int is_system_method(const char *method); 51 | 52 | extern int is_system_file(const char *file); 53 | 54 | extern size_t unwind_current_context(void** buffer, size_t max); 55 | 56 | #endif //NDKTEST_UNWIND_H 57 | -------------------------------------------------------------------------------- /bugsnag/deps/bugsnag/bugsnag.h: -------------------------------------------------------------------------------- 1 | #ifndef BUGSNAG_H 2 | #define BUGSNAG_H 3 | 4 | // Function used within the library to log messages 5 | #ifndef BUGSNAG_LOG 6 | #define BUGSNAG_LOG(fmt, ...) printf(fmt, ##__VA_ARGS__) 7 | #endif 8 | 9 | #include "report.h" 10 | #include "serialize.h" 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /bugsnag/deps/bugsnag/serialize.h: -------------------------------------------------------------------------------- 1 | #ifndef BUGSNAG_SERIALIZE_H 2 | #define BUGSNAG_SERIALIZE_H 3 | 4 | #include "report.h" 5 | 6 | /** 7 | * Serialize a report into a JSON representation string. If callback is not 8 | * NULL, it is invoked with the completed Parson JSON value before the 9 | * string representation is returned. 10 | */ 11 | char *bugsnag_serialize_report(bugsnag_report *report, 12 | void (*callback)(JSON_Value *)); 13 | 14 | extern char * bugsnag_serialize_event(bsg_event *event); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /bugsnag/deps/deps/parson/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parson", 3 | "version": "1.0.2", 4 | "repo": "clibs/parson", 5 | "description": "Small json parser and reader", 6 | "keywords": [ "json", "parser" ], 7 | "license": "MIT", 8 | "src": [ 9 | "parson.c", 10 | "parson.h" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | 4 | rm -rf libevent/native 5 | rm -rf libevent/*linux-android* 6 | rm -rf libevent/*apple* 7 | rm -rf blocksruntime/*linux-android* 8 | rm -rf libutp/libutp.a 9 | rm -rf libutp/*linux-android* 10 | rm -rf libutp/*apple* 11 | rm -rf android-toolchain* 12 | cd libsodium && git clean -fxd 13 | cd .. 14 | #rm libsodium/configure 15 | rm -rf libsodium/native 16 | rm -rf libsodium/libsodium-ios* 17 | rm -rf libsodium/libsodium-apple* 18 | rm -rf libsodium/libsodium-android* 19 | rm -rf libsodium/android-toolchain* 20 | rm -rf bugsnag-cocoa/iOS/*apple* 21 | rm -rf bugsnag-cocoa/*apple* 22 | rm -rf android/src/main/jniLibs 23 | rm -rf libunwind-ndk/*linux-android* 24 | rm *.o || true 25 | cd android 26 | rm -rf build 27 | #gradle wrapper 28 | ./gradlew clean 29 | cd examples/WebViewSample 30 | rm -rf build 31 | #gradle wrapper 32 | ./gradlew clean 33 | cd ../.. 34 | cd vpn 35 | rm -rf build 36 | #gradle wrapper 37 | ./gradlew clean 38 | -------------------------------------------------------------------------------- /client_main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "newnode.h" 4 | #include "network.h" 5 | #include "thread.h" 6 | #include "log.h" 7 | #include "g_https_cb.h" 8 | 9 | #ifdef __APPLE__ 10 | #include 11 | #endif 12 | 13 | https_request *https_request_alloc(size_t bufsize, unsigned int flags, unsigned timeout); 14 | 15 | void ui_display_stats(const char *type, uint64_t direct, uint64_t peers) {} 16 | bool network_process_udp_cb(const uint8_t *buf, size_t len, const sockaddr *sa, socklen_t salen) { return false; } 17 | ssize_t d2d_sendto(const uint8_t* buf, size_t len, const sockaddr_in6 *sin6) { return -1; } 18 | 19 | int main(int argc, char *argv[]) 20 | { 21 | char *port_s = "8006"; 22 | 23 | for (;;) { 24 | int c = getopt(argc, argv, "T:p:v"); 25 | if (c == -1) { 26 | break; 27 | } 28 | switch (c) { 29 | case 'p': 30 | port_s = optarg; 31 | break; 32 | case 'v': 33 | o_debug++; 34 | break; 35 | default: 36 | log_error("Unhandled argument: %c\n", c); 37 | return 1; 38 | } 39 | } 40 | 41 | port_t port = atoi(port_s); 42 | __block network *n = newnode_init("client", "com.newnode.client", &port, ^(const https_request *request, const char *url, https_complete_callback cb) { 43 | debug("https: %s\n", url); 44 | // note: do_https will call the completion callback if the request fails immediately 45 | return do_https(n, request, url, cb); 46 | }); 47 | if (!n) { 48 | return 1; 49 | } 50 | 51 | #ifdef __APPLE__ 52 | newnode_thread(n); 53 | CFRunLoopRun(); 54 | return 0; 55 | #else 56 | return newnode_run(n); 57 | #endif 58 | } 59 | -------------------------------------------------------------------------------- /constants.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONSTANTS_H__ 2 | #define __CONSTANTS_H__ 3 | 4 | #define VERSION "2.1.5" 5 | 6 | #ifdef DEBUG 7 | #define injector_sk "\x9e\x20\xb0\x57\x6d\x12\x70\x33\x05\x42\x66\x4d\x07\x00\xfe\x0a\x60\x94\xe0\x9a\xc5\xb9\xad\x78\xb8\xa6\x56\x3e\x09\xf7\x2a\xd2\x1d\x80\x27\x79\xa0\xb9\x27\xd6\x87\x11\xec\xdc\x33\x7a\xe3\x91\x28\xb8\x07\xf1\xb5\x8c\x42\x74\xf3\xae\x09\xcd\x48\x10\x87\x96" 8 | #define injector_pk "\x1d\x80\x27\x79\xa0\xb9\x27\xd6\x87\x11\xec\xdc\x33\x7a\xe3\x91\x28\xb8\x07\xf1\xb5\x8c\x42\x74\xf3\xae\x09\xcd\x48\x10\x87\x96" 9 | #else 10 | #define injector_pk "\xe5\x7d\x10\x3b\xf1\x49\x6d\x24\x9c\x1a\x9e\x83\x13\x1a\x75\xb5\xf6\x2e\x3a\x67\x7e\xb6\xab\x9d\x66\x77\x5f\xb4\x8a\xbe\x68\xfa" 11 | #endif 12 | 13 | #define hashed_headers {"Content-Encoding", "Content-Location", "Content-Type", "Location", "Access-Control-Allow-Origin"} 14 | 15 | #endif // __CONSTANTS_H__ 16 | -------------------------------------------------------------------------------- /d2d.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "network.h" 5 | #include "d2d.h" 6 | 7 | 8 | sockaddr_in6 endpoint_to_addr(const endpoint *endpoint) 9 | { 10 | sockaddr_in6 sin6 = { 11 | .sin6_family = AF_INET6, 12 | #ifdef __APPLE__ 13 | .sin6_len = sizeof(sin6), 14 | #endif 15 | // Unique Local IPv6 Unicast Address 16 | .sin6_addr.s6_addr[0] = 0xfc, 17 | .sin6_port = endpoint->port 18 | }; 19 | memcpy(&sin6.sin6_addr.s6_addr[UNIQUE_LOCAL_PREFIX_LENGTH], endpoint->addr, sizeof(endpoint->addr)); 20 | assert(IN6_IS_ADDR_UNIQUE_LOCAL(&sin6.sin6_addr)); 21 | return sin6; 22 | } 23 | 24 | endpoint addr_to_endpoint(const sockaddr_in6 *sin6) 25 | { 26 | assert(sin6->sin6_family == AF_INET6); 27 | assert(IN6_IS_ADDR_UNIQUE_LOCAL(&sin6->sin6_addr)); 28 | endpoint e = {.port = sin6->sin6_port}; 29 | memcpy(e.addr, &sin6->sin6_addr.s6_addr[UNIQUE_LOCAL_PREFIX_LENGTH], sizeof(e.addr)); 30 | return e; 31 | } 32 | -------------------------------------------------------------------------------- /d2d.h: -------------------------------------------------------------------------------- 1 | #ifndef __D2D_H__ 2 | #define __D2D_H__ 3 | 4 | #define UNIQUE_LOCAL_PREFIX_LENGTH 1 5 | 6 | typedef struct { 7 | uint8_t addr[sizeof(in6_addr) - UNIQUE_LOCAL_PREFIX_LENGTH]; 8 | port_t port; 9 | } PACKED endpoint; 10 | 11 | ssize_t d2d_sendto(const uint8_t* buf, size_t len, const sockaddr_in6 *sin6) __attribute__((weak)); 12 | bool d2d_received(network *n, const uint8_t *buf, size_t len, const sockaddr *sa, socklen_t salen); 13 | sockaddr_in6 endpoint_to_addr(const endpoint *endpoint); 14 | endpoint addr_to_endpoint(const sockaddr_in6 *sin6); 15 | 16 | #endif // __D2D_H__ 17 | -------------------------------------------------------------------------------- /dht.h: -------------------------------------------------------------------------------- 1 | #ifndef __DHT_H__ 2 | #define __DHT_H__ 3 | 4 | #include 5 | 6 | typedef struct dht dht; 7 | 8 | #include "network.h" 9 | 10 | 11 | typedef struct sockaddr sockaddr; 12 | typedef void (^dht_event_callback)(int event, 13 | const unsigned char *info_hash, 14 | const void *data, size_t data_len); 15 | 16 | dht* dht_setup(network *n); 17 | void dht_set_event_cb(dht *d, dht_event_callback cb); 18 | void dht_add_bootstrap(dht *d, const char *host, port_t port); 19 | void dht_restore(dht *d); 20 | time_t dht_tick(dht *d); 21 | bool dht_process_udp(dht *d, const uint8_t *buffer, size_t len, const sockaddr *to, socklen_t tolen, time_t *tosleep); 22 | bool dht_process_icmp_error(dht *d, const uint8_t *buffer, size_t len, const sockaddr *to, socklen_t tolen); 23 | void dht_announce(dht *d, const uint8_t *info_hash); 24 | void dht_get_peers(dht *d, const uint8_t *info_hash); 25 | size_t dht_num_searches(void); 26 | void dht_destroy(dht *d); 27 | 28 | #endif // __DHT_H__ 29 | -------------------------------------------------------------------------------- /dns_prefetch.h: -------------------------------------------------------------------------------- 1 | #include "network.h" 2 | 3 | 4 | typedef bool (^choose_addr_cb)(evutil_addrinfo *addr); 5 | bool choose_addr(evutil_addrinfo *g, choose_addr_cb cb); 6 | char* make_ip_addr_list(evutil_addrinfo *p); 7 | void dns_prefetch(network *n, const char *host); 8 | void dns_prefetch_store_result(network *n, evutil_addrinfo *nna, const char *host, uint32_t ttl); 9 | extern void platform_dns_prefetch(network *n, const char *host); 10 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-tactile 2 | title: NewNode 3 | description: NewNode decentralized Content Distribution Network 4 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # NewNode decentralized Content Distribution Network 2 | * [Spec](./newnode-spec.md) 3 | -------------------------------------------------------------------------------- /hash_table.h: -------------------------------------------------------------------------------- 1 | #ifndef __HASH_TABLE_H__ 2 | #define __HASH_TABLE_H__ 3 | 4 | #include 5 | 6 | struct kh_hash_table_val_s; 7 | typedef struct kh_hash_table_val_s hash_table; 8 | 9 | typedef void* (^create_fn)(void); 10 | typedef bool (^iter_fn)(const char *key, void *val); 11 | 12 | hash_table* hash_table_create(void); 13 | size_t hash_length(hash_table *h); 14 | void* hash_get(hash_table *h, const char *key); 15 | void* hash_get_or_insert(hash_table *h, const char *key, create_fn c); 16 | void* hash_set(hash_table *h, const char *key, void *val); 17 | void* hash_remove(hash_table *h, const char *key); 18 | void hash_iter(hash_table *h, iter_fn iter); 19 | void hash_table_free(hash_table *h); 20 | 21 | #endif // __HASH_TABLE_H__ 22 | -------------------------------------------------------------------------------- /icmp_handler.h: -------------------------------------------------------------------------------- 1 | #ifndef __ICMP_HANDLER_H__ 2 | #define __ICMP_HANDLER_H__ 3 | 4 | 5 | #include "network.h" 6 | 7 | 8 | #ifdef __linux__ 9 | void icmp_handler(network *n); 10 | #endif 11 | 12 | #endif // __ICMP_HANDLER_H__ 13 | -------------------------------------------------------------------------------- /ios/Bluetooth.h: -------------------------------------------------------------------------------- 1 | @import Foundation; 2 | #include "network.h" 3 | 4 | 5 | @interface Bluetooth : NSObject 6 | 7 | - (instancetype)initWithNetwork:(network*)n; 8 | - (void)restart; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /ios/Framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | NewNode 9 | CFBundleIdentifier 10 | com.clostra.NewNode 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | NewNode 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(CURRENT_PROJECT_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Framework/NewNode-iOS.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef bool (^d2dReceivedCallback)(const uint8_t *buf, size_t len, const struct sockaddr *sa, socklen_t salen); 4 | 5 | @interface NewNode : NSObject 6 | 7 | @property (class, readonly) NSDictionary* connectionProxyDictionary; 8 | @property (class) int logLevel; 9 | 10 | @end 11 | 12 | @interface NewNodeExperimental : NSObject 13 | 14 | + (void)setRequestBluetoothPermission:(bool)enabled; 15 | + (void)setRequestDiscoveryPermission:(bool)enabled; 16 | + (void)setD2dReceivedCallback:(d2dReceivedCallback)cb; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/Framework/export_list: -------------------------------------------------------------------------------- 1 | # File: export_list 2 | _newnode_init 3 | _OBJC_CLASS_$_NewNode 4 | -------------------------------------------------------------------------------- /ios/Framework/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module NewNode { 2 | header "NewNode.h" 3 | export * 4 | } 5 | -------------------------------------------------------------------------------- /ios/HTTPSRequest.h: -------------------------------------------------------------------------------- 1 | @interface HTTPSRequest : NSObject 2 | @end 3 | -------------------------------------------------------------------------------- /ios/NetService.h: -------------------------------------------------------------------------------- 1 | @import Foundation; 2 | 3 | #include "network.h" 4 | 5 | 6 | @interface NetService : NSObject 7 | 8 | - (instancetype)initWithNetwork:(network*)n; 9 | - (void)restart; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-72.png -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-Small-50.png -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-Small.png -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon-Small@2x.png -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon.png -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/Icon@2x.png -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Icons/iTunesArtwork -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/Launch Screen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/WebViewControllerHTML/anchorInstall.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Anchor Install 6 | 34 | 35 | 36 |

Anchor Install

37 |

38 | URL: %@ 39 |

40 |
41 | 42 | 43 | 44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/WebViewControllerHTML/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error 6 | 7 | 8 |

Error Loading Page

9 |

10 | URL: %@ 11 |
12 | Domain: %@ 13 |
14 | Code: %zd 15 |

16 | 17 | 18 | -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/WebViewControllerHTML/root.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Root 6 | 7 | 8 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/WebViewControllerHTML/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/examples/CustomHTTPProtocol/CustomHTTPProtocol/WebViewControllerHTML/spinner.gif -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/App_Store_1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/App_Store_1024x1024.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_App_76_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_App_76_1x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_App_76_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_App_76_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_App_83.5_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_App_83.5_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Notifications_20_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Notifications_20_1x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Notifications_20_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Notifications_20_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Settings_29_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Settings_29_1x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Settings_29_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Pro_Settings_29_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_40_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_40_1x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_40_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_40_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_App_60_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_App_60_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_App_60_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_App_60_3x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Notifications_20_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Notifications_20_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Notifications_20_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Notifications_20_3x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_29_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_29_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_29_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_29_3x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_40_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_40_2x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_40_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_40_3x.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/cities.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "filename" : "cities_white.png", 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/cities.imageset/cities_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/cities.imageset/cities_white.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/earth_map_blue.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "filename" : "map_blue.png", 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/earth_map_blue.imageset/map_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/earth_map_blue.imageset/map_blue.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/earth_map_dark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "filename" : "map_dark_grey.png", 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/earth_map_dark.imageset/map_dark_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/earth_map_dark.imageset/map_dark_grey.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/earth_map_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "filename" : "map_grey.png", 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/earth_map_gray.imageset/map_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/earth_map_gray.imageset/map_grey.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/info_off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "info_colored.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/info_off.imageset/info_colored.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/info_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "info_white.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/info_on.imageset/info_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/inner_arc.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "inner_arc.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/inner_arc.imageset/inner_arc.svg: -------------------------------------------------------------------------------- 1 | 5 | 12 | 13 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/launch_image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "launch_image_light.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "filename" : "launch_image_dark.png", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "appearances" : [ 25 | { 26 | "appearance" : "luminosity", 27 | "value" : "dark" 28 | } 29 | ], 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/launch_image.imageset/launch_image_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/launch_image.imageset/launch_image_dark.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/launch_image.imageset/launch_image_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/launch_image.imageset/launch_image_light.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "idiom" : "universal", 15 | "scale" : "1x" 16 | }, 17 | { 18 | "idiom" : "universal", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "appearances" : [ 23 | { 24 | "appearance" : "luminosity", 25 | "value" : "dark" 26 | } 27 | ], 28 | "idiom" : "universal", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "filename" : "newnode_vpn_logo_black.png", 33 | "idiom" : "universal", 34 | "scale" : "3x" 35 | }, 36 | { 37 | "appearances" : [ 38 | { 39 | "appearance" : "luminosity", 40 | "value" : "dark" 41 | } 42 | ], 43 | "filename" : "newnode_vpn_logo_white.png", 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_off.imageset/newnode_vpn_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_off.imageset/newnode_vpn_logo_black.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_off.imageset/newnode_vpn_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_off.imageset/newnode_vpn_logo_white.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "idiom" : "universal", 15 | "scale" : "1x" 16 | }, 17 | { 18 | "idiom" : "universal", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "appearances" : [ 23 | { 24 | "appearance" : "luminosity", 25 | "value" : "dark" 26 | } 27 | ], 28 | "idiom" : "universal", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "filename" : "newnode_vpn_logo_white.png", 33 | "idiom" : "universal", 34 | "scale" : "3x" 35 | }, 36 | { 37 | "appearances" : [ 38 | { 39 | "appearance" : "luminosity", 40 | "value" : "dark" 41 | } 42 | ], 43 | "filename" : "newnode_vpn_logo_white.png", 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_on.imageset/newnode_vpn_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clostra/newnode/1dcdbbc7e8de78e041526a10449367b21fd00398/ios/vpn/NewNode VPN/Assets.xcassets/newnode_logo_on.imageset/newnode_vpn_logo_white.png -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/outer_arc.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "outer_arc.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/outer_arc.imageset/outer_arc.svg: -------------------------------------------------------------------------------- 1 | 5 | 12 | 13 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "power_off_light.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "filename" : "power_off_dark.svg", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "appearances" : [ 25 | { 26 | "appearance" : "luminosity", 27 | "value" : "dark" 28 | } 29 | ], 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_off.imageset/power_off_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_off.imageset/power_off_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_off_pressed.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "power_off_light_pressed.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "filename" : "power_off_dark_pressed.svg", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "appearances" : [ 25 | { 26 | "appearance" : "luminosity", 27 | "value" : "dark" 28 | } 29 | ], 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_off_pressed.imageset/power_off_dark_pressed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_off_pressed.imageset/power_off_light_pressed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "power_on_light.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "filename" : "power_on_dark.svg", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "appearances" : [ 25 | { 26 | "appearance" : "luminosity", 27 | "value" : "dark" 28 | } 29 | ], 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Assets.xcassets/power_button_on_pressed.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "power_on_light_pressed.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "filename" : "power_on_dark_pressed.svg", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "appearances" : [ 25 | { 26 | "appearance" : "luminosity", 27 | "value" : "dark" 28 | } 29 | ], 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/gradient_off1.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0xFF", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x00", 27 | "green" : "0x00", 28 | "red" : "0x00" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/gradient_off2.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0xFF", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.000", 27 | "green" : "0.000", 28 | "red" : "0.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/gradient_on1.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0x94", 10 | "red" : "0x19" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x00", 27 | "green" : "0x00", 28 | "red" : "0x00" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/gradient_on2.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0x94", 10 | "red" : "0x19" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x00", 27 | "green" : "0x00", 28 | "red" : "0x00" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/info_bkg.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0xFF", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.000", 27 | "green" : "0.000", 28 | "red" : "0.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/info_header.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x33", 9 | "green" : "0x78", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x33", 27 | "green" : "0x78", 28 | "red" : "0xFF" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/info_text.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x21", 9 | "green" : "0x21", 10 | "red" : "0x21" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0xDE", 27 | "green" : "0xDE", 28 | "red" : "0xDE" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/status_text_off.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x33", 9 | "green" : "0x78", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x33", 27 | "green" : "0x78", 28 | "red" : "0xFF" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/status_text_on.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "1.000", 9 | "green" : "1.000", 10 | "red" : "1.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "1.000", 27 | "green" : "1.000", 28 | "red" : "1.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/usage_text_off.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xA0", 9 | "green" : "0xA0", 10 | "red" : "0xA0" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0xCC", 27 | "green" : "0xCC", 28 | "red" : "0xCC" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Colors.xcassets/usage_text_on.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0xEA", 10 | "red" : "0xD1" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0xCC", 27 | "green" : "0xCC", 28 | "red" : "0xCC" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/FontUpdater.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FontUpdater.swift 3 | // NewNode VPN 4 | // 5 | // Created by Mikhail Koroteev on 06/02/21. 6 | // Copyright © 2021 Clostra. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIFont { 13 | func with(_ traits: UIFontDescriptor.SymbolicTraits...) -> UIFont { 14 | guard let descriptor = self.fontDescriptor.withSymbolicTraits(UIFontDescriptor.SymbolicTraits(traits).union(self.fontDescriptor.symbolicTraits)) else { 15 | return self 16 | } 17 | return UIFont(descriptor: descriptor, size: 0) 18 | } 19 | 20 | func without(_ traits: UIFontDescriptor.SymbolicTraits...) -> UIFont { 21 | guard let descriptor = self.fontDescriptor.withSymbolicTraits(self.fontDescriptor.symbolicTraits.subtracting(UIFontDescriptor.SymbolicTraits(traits))) else { 22 | return self 23 | } 24 | return UIFont(descriptor: descriptor, size: 0) 25 | } 26 | } 27 | 28 | extension UIButton { 29 | func underline( bold: Bool ) { 30 | guard let text = self.titleLabel?.text else { return } 31 | guard let color = self.titleColor(for: .normal) else { return } 32 | guard var font = self.titleLabel?.font else { return } 33 | if bold { 34 | font = font.with(.traitBold) 35 | } else { 36 | font = font.without(.traitBold) 37 | } 38 | 39 | let attributedString = NSMutableAttributedString(string: text) 40 | let range = NSRange(location: 0, length: text.count) 41 | let attributes: [NSAttributedString.Key : Any] = 42 | [.font : font, 43 | .underlineColor : color, 44 | .foregroundColor : color, 45 | .underlineStyle: NSUnderlineStyle.single.rawValue 46 | ] 47 | attributedString.addAttributes(attributes, range: range) 48 | self.setAttributedTitle(attributedString, for: .normal) 49 | } 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/GradientView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GradientView.swift 3 | // NewNode VPN 4 | // 5 | // Created by Mikhail Koroteev on 05/25/21. 6 | // Copyright © 2021 Clostra. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | @IBDesignable 13 | final class GradientView: UIView { 14 | @IBInspectable var startColor: UIColor = UIColor.clear { 15 | didSet { 16 | updateGradient() 17 | } 18 | } 19 | @IBInspectable var endColor: UIColor = UIColor.clear { 20 | didSet { 21 | updateGradient() 22 | } 23 | } 24 | 25 | private var gradient = CAGradientLayer() 26 | 27 | override init(frame: CGRect) { 28 | super.init(frame: frame) 29 | layer.addSublayer(gradient) 30 | } 31 | 32 | required init?(coder aDecoder: NSCoder) { 33 | super.init(coder: aDecoder) 34 | layer.addSublayer(gradient) 35 | } 36 | 37 | private func updateGradient() { 38 | gradient.colors = [startColor.cgColor, endColor.cgColor] 39 | if bounds.isEmpty { 40 | return 41 | } 42 | let ux = bounds.width / bounds.height 43 | let uy = bounds.height / bounds.width 44 | let coef = (ux + uy) / (ux * ux + uy * uy) 45 | 46 | gradient.startPoint = CGPoint(x: 0.0, y: 0.0) 47 | gradient.endPoint = CGPoint(x: coef * ux, y: coef * uy) 48 | gradient.zPosition = -1 49 | gradient.frame = bounds 50 | setNeedsDisplay() 51 | } 52 | 53 | override func prepareForInterfaceBuilder() { 54 | super.prepareForInterfaceBuilder() 55 | updateGradient() 56 | } 57 | 58 | override func layoutSubviews() { 59 | super.layoutSubviews() 60 | updateGradient() 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/InfoViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InfoViewController.swift 3 | // NewNode VPN 4 | // 5 | // Created by Mikhail Koroteev on 05/31/21. 6 | // Copyright © 2021 Clostra. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | class InfoViewController: UIViewController { 13 | @IBOutlet weak var infoHeader: UITextView! 14 | @IBOutlet weak var infoText: UITextView! 15 | 16 | @IBAction func tapped(_ sender: Any) { 17 | dismiss(animated: true, completion: nil) 18 | } 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | infoText.text = NSLocalizedString("info_text", comment: "") 23 | infoHeader.text = NSLocalizedString("info_title", comment: "") 24 | infoHeader.adjustsFontForContentSizeCategory = true 25 | 26 | // XXX: using height as a proxy for device type 27 | if UIScreen.main.nativeBounds.height < 1200 { 28 | infoText.font = UIFont.systemFont(ofSize: 14.0) 29 | infoHeader.font = UIFont.systemFont(ofSize: 22.0) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | NewNode VPN 4 | 5 | Created by Mikhail Koroteev on 31.05.21. 6 | Copyright © 2021 Clostra. All rights reserved. 7 | */ 8 | 9 | "info_title" = "How NewNode Works"; 10 | "info_text" = "NewNode uses a peer to peer network to get around blocking and to establish a good internet connection when connectivity is sparse. 11 | \n\n 12 | NewNode sends your traffic through a peer network that makes connections through user devices rather than relying on a central server. This, along with encrypting and obfuscating the traffic, makes NewNode very robust at content access."; 13 | 14 | // Status 15 | "connected" = "Connected"; 16 | "disconnected" = "Disconnected"; 17 | "invalid" = "Not configured"; 18 | "connecting" = "Connecting..."; 19 | "reasserting" = "Reconnecting..."; 20 | "disconnecting" = "Disconnecting..."; 21 | 22 | "hint_connected" = "tap to disconnect"; 23 | "hint_disconnected" = "tap to connect\nto NewNode VPN"; 24 | 25 | "usage" = "USAGE"; 26 | "day" = "Day"; 27 | "week" = "Week"; 28 | "all_time" = "Max"; 29 | "direct" = "Direct: "; 30 | "peers" = "Through peers: "; 31 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/NewNode VPN-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #ifndef NewNode_Bridging_Header_h 6 | #define NewNode_Bridging_Header_h 7 | 8 | #include "MMWormhole.h" 9 | 10 | #endif /* NewNode_Bridging_Header_h */ 11 | -------------------------------------------------------------------------------- /ios/vpn/NewNode VPN/NewNode VPN.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.networking.networkextension 6 | 7 | packet-tunnel-provider 8 | 9 | com.apple.security.app-sandbox 10 | 11 | com.apple.security.application-groups 12 | 13 | group.com.newnode.vpn 14 | 15 | com.apple.security.network.client 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ios/vpn/Tunnel/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Tunnel 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSBonjourServices 24 | 25 | _newnode._udp. 26 | 27 | NSExtension 28 | 29 | NSExtensionPointIdentifier 30 | com.apple.networkextension.packet-tunnel 31 | NSExtensionPrincipalClass 32 | $(PRODUCT_MODULE_NAME).PacketTunnelProvider 33 | 34 | NSLocalNetworkUsageDescription 35 | Connect with nearby devices running NewNode. 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/vpn/Tunnel/NewNode-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // NewNode-Bridging-Header.h 3 | // NewNode VPN 4 | // 5 | // Created by Gregory Hazel on 7/9/19. 6 | // Copyright © 2019 Clostra. All rights reserved. 7 | // 8 | 9 | #ifndef NewNode_Bridging_Header_h 10 | #define NewNode_Bridging_Header_h 11 | 12 | #include "NewNode.h" 13 | #include "MMWormhole.h" 14 | 15 | #endif /* NewNode_Bridging_Header_h */ 16 | -------------------------------------------------------------------------------- /ios/vpn/Tunnel/Tunnel.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.networking.networkextension 6 | 7 | packet-tunnel-provider 8 | 9 | com.apple.security.app-sandbox 10 | 11 | com.apple.security.application-groups 12 | 13 | group.com.newnode.vpn 14 | 15 | com.apple.security.network.client 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /log.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #ifndef ANDROID 9 | #include 10 | #endif 11 | 12 | #include "log.h" 13 | 14 | 15 | int o_debug = 0; 16 | 17 | 18 | #ifdef ANDROID 19 | void bugsnag_log(const char *fmt, ...) 20 | { 21 | char buf[4096]; 22 | va_list ap; 23 | va_start(ap, fmt); 24 | vsnprintf(buf, sizeof(buf), fmt, ap); 25 | va_end(ap); 26 | void bugsnag_leave_breadcrumb_log(const char *buf); 27 | bugsnag_leave_breadcrumb_log(buf); 28 | } 29 | #endif 30 | 31 | void hexdump(const void *addr, size_t len) 32 | { 33 | unsigned char buff[33]; 34 | unsigned char *pc = (unsigned char*)addr; 35 | 36 | if (!len) { 37 | return; 38 | } 39 | 40 | size_t i = 0; 41 | for (i = 0; i < len; i++) { 42 | if ((i % 32) == 0) { 43 | if (i != 0) { 44 | fprintf(stderr, " %s\n", buff); 45 | } 46 | fprintf(stderr, " %04zx ", i); 47 | } 48 | fprintf(stderr, " %02x", pc[i]); 49 | 50 | buff[i % 32] = isprint(pc[i]) ? pc[i] : '.'; 51 | buff[(i % 32) + 1] = '\0'; 52 | } 53 | 54 | while ((i % 32) != 0) { 55 | fprintf(stderr, " "); 56 | i++; 57 | } 58 | 59 | fprintf(stderr, " %s\n", buff); 60 | } 61 | -------------------------------------------------------------------------------- /log.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOG_H__ 2 | #define __LOG_H__ 3 | 4 | #include 5 | 6 | extern int o_debug; 7 | 8 | #ifdef __ANDROID__ 9 | #include 10 | void bugsnag_log(const char *fmt, ...); 11 | #define log_error(...) __android_log_print(ANDROID_LOG_ERROR, "newnode", __VA_ARGS__); bugsnag_log(__VA_ARGS__); 12 | #define debug(...) if (o_debug) { __android_log_print(ANDROID_LOG_VERBOSE, "newnode", __VA_ARGS__); } bugsnag_log(__VA_ARGS__); 13 | #define critical(...) 14 | 15 | #undef assert 16 | #define assert(e) if (!(e)) { \ 17 | bugsnag_log("%s:%d: %s: assertion \"%s\" failed", __FILE__, __LINE__, __PRETTY_FUNCTION__, #e); \ 18 | __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, #e); \ 19 | } 20 | #elif defined __APPLE__ 21 | #include 22 | #define log_error(...) fflush(stdout); fprintf(stderr, __VA_ARGS__); fflush(stderr); os_log_error(OS_LOG_DEFAULT, __VA_ARGS__); 23 | #define debug(...) if (o_debug) { fflush(stdout); fprintf(stderr, __VA_ARGS__); fflush(stderr); os_log(OS_LOG_DEFAULT, __VA_ARGS__); } 24 | #else 25 | #define log_error(...) fflush(stdout); fprintf(stderr, __VA_ARGS__); fflush(stderr); 26 | #define debug(...) if (o_debug) { fflush(stdout); fprintf(stderr, __VA_ARGS__); fflush(stderr); } 27 | #endif 28 | 29 | #define log_errno(err) log_error("%s %s: (%d) %s\n", __func__, err, errno, strerror(errno)); 30 | 31 | #define ddebug(...) if (o_debug >= 2) { debug(__VA_ARGS__); } 32 | 33 | void hexdump(const void *p, size_t len); 34 | 35 | #endif // __LOG_H__ 36 | -------------------------------------------------------------------------------- /lsd.h: -------------------------------------------------------------------------------- 1 | #ifndef __LSD_H__ 2 | #define __LSD_H__ 3 | 4 | #include "network.h" 5 | 6 | 7 | void lsd_setup(network *n); 8 | void lsd_send(network *n, bool reply); 9 | 10 | #endif // __LSD_H__ 11 | -------------------------------------------------------------------------------- /merkle_tree.h: -------------------------------------------------------------------------------- 1 | #ifndef __MERKLE_TREE_H__ 2 | #define __MERKLE_TREE_H__ 3 | 4 | #define LEAF_CHUNK_SIZE 16384 5 | 6 | typedef struct { 7 | uint8_t hash[crypto_generichash_BYTES]; 8 | } node; 9 | 10 | typedef struct { 11 | crypto_generichash_state leaf_state; 12 | uint16_t leaf_progress; 13 | size_t leaves_num; 14 | size_t nodes_alloc; 15 | node *nodes; 16 | } merkle_tree; 17 | 18 | void merkle_tree_free(merkle_tree *m); 19 | bool merkle_tree_set_leaves(merkle_tree *m, const uint8_t *data, size_t length); 20 | void merkle_tree_set_leaf(merkle_tree *m, size_t leaf_idx, const uint8_t *hash); 21 | void merkle_tree_add_hashed_data(merkle_tree *m, const uint8_t *data, size_t length); 22 | void merkle_tree_add_evbuffer(merkle_tree *m, evbuffer *buf); 23 | void merkle_tree_get_root(merkle_tree *m, uint8_t *root_hash); 24 | 25 | #endif // __MERKLE_TREE_H__ 26 | -------------------------------------------------------------------------------- /newnode.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "g_https_cb.h" 4 | 5 | typedef uint16_t port_t; 6 | typedef struct network network; 7 | 8 | typedef https_request_token (^https_callback)(const https_request *request, const char *url, https_complete_callback cb); 9 | 10 | network* newnode_init(const char *app_name, const char *app_id, port_t *port, https_callback https_cb); 11 | int newnode_run(network *n); 12 | void newnode_thread(network *n); 13 | port_t newnode_get_port(network *n); 14 | -------------------------------------------------------------------------------- /newnode.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /newnode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /nn_features.h: -------------------------------------------------------------------------------- 1 | // most of the FEATURE_xxx macros should go away 2 | // (either the feature will always be implemented or removed) 3 | 4 | #define FEATURE_RANDOM_SKIP_TRYFIRST 1 5 | 6 | // the following features should only be enabled when testing 7 | // and should be disabled when shipped or committed to a public repo 8 | 9 | #define TEST_WIRED_INJECTOR 0 10 | #define TEST_INJECTOR "52.88.7.21" 11 | #define TEST_INJECTOR_PORT 9000 12 | 13 | #define TEST_STALL_DETECTOR 0 14 | -------------------------------------------------------------------------------- /sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHA1_H__ 2 | #define __SHA1_H__ 3 | 4 | /* 5 | SHA-1 in C 6 | By Steve Reid 7 | 100% Public Domain 8 | */ 9 | 10 | #include "stdint.h" 11 | 12 | 13 | typedef struct { 14 | uint32_t state[5]; 15 | uint32_t count[2]; 16 | unsigned char buffer[64]; 17 | } SHA1_CTX; 18 | 19 | void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); 20 | 21 | void SHA1Init(SHA1_CTX *context); 22 | 23 | void SHA1Update(SHA1_CTX *context, const unsigned char *data, uint32_t len); 24 | 25 | void SHA1Final(unsigned char digest[20], SHA1_CTX *context); 26 | 27 | void SHA1(unsigned char *hash_out, const unsigned char *data, unsigned int len); 28 | 29 | #endif // __SHA1_H__ 30 | -------------------------------------------------------------------------------- /stall_detector.c: -------------------------------------------------------------------------------- 1 | #include "stall_detector.h" 2 | #include "network.h" 3 | #include "log.h" 4 | #include "thread.h" 5 | #include "backtrace.h" 6 | 7 | #include 8 | #include 9 | 10 | 11 | uint64_t stall_last_prepare; 12 | uint64_t stall_last_check; 13 | pthread_mutex_t stall_lock; 14 | 15 | double ms_delta(uint64_t t) 16 | { 17 | return (double)(us_clock() - t) / 1000.0; 18 | } 19 | 20 | static void check_cb(evwatch *watch, const evwatch_check_cb_info *info, void *arg) 21 | { 22 | stall_last_check = us_clock(); 23 | //debug("check: %llu delta:%.2fms\n", stall_last_check, ms_delta(stall_last_prepare)); 24 | pthread_mutex_unlock(&stall_lock); 25 | } 26 | 27 | static void prepare_cb(evwatch *watch, const evwatch_prepare_cb_info *info, void *arg) 28 | { 29 | pthread_mutex_lock(&stall_lock); 30 | stall_last_prepare = us_clock(); 31 | //debug("prepare:%llu delta:%.2fms\n", stall_last_prepare, ms_delta(stall_last_check)); 32 | } 33 | 34 | void stall_detector(event_base *base) 35 | { 36 | evwatch_prepare_new(base, prepare_cb, NULL); 37 | evwatch_check_new(base, check_cb, NULL); 38 | pthread_mutex_init(&stall_lock, NULL); 39 | pthread_t ev_thread = pthread_self(); 40 | thread(^{ 41 | for (;;) { 42 | pthread_mutex_lock(&stall_lock); 43 | if (stall_last_check > stall_last_prepare && ms_delta(stall_last_check) > 100) { 44 | uint64_t stall_prepare = stall_last_prepare; 45 | debug("event loop stalled! delta:%.2fms\n", ms_delta(stall_last_check)); 46 | backtrace_thread(ev_thread); 47 | while (stall_prepare == stall_last_prepare) { 48 | pthread_mutex_unlock(&stall_lock); 49 | usleep(10 * 1000); 50 | pthread_mutex_lock(&stall_lock); 51 | } 52 | } 53 | pthread_mutex_unlock(&stall_lock); 54 | usleep(10 * 1000); 55 | } 56 | }); 57 | } 58 | -------------------------------------------------------------------------------- /stall_detector.h: -------------------------------------------------------------------------------- 1 | #ifndef __STALL_DETECTOR_H__ 2 | #define __STALL_DETECTOR_H__ 3 | 4 | #include "network.h" 5 | 6 | 7 | void stall_detector(event_base *base); 8 | 9 | #endif // __STALL_DETECTOR_H__ 10 | -------------------------------------------------------------------------------- /thread.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "thread.h" 5 | 6 | 7 | void* thread_runner(void *userdata) 8 | { 9 | thread_body tb = (thread_body)userdata; 10 | tb(); 11 | Block_release(tb); 12 | return NULL; 13 | } 14 | 15 | void thread(thread_body tb) 16 | { 17 | tb = Block_copy(tb); 18 | pthread_t t; 19 | if (pthread_create(&t, NULL, thread_runner, tb) == -1) { 20 | Block_release(tb); 21 | return; 22 | } 23 | pthread_detach(t); 24 | } 25 | -------------------------------------------------------------------------------- /thread.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | typedef void (^thread_body)(void); 6 | 7 | void thread(thread_body tb); 8 | -------------------------------------------------------------------------------- /timer.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "timer.h" 5 | 6 | 7 | void timer_free(timer *t) 8 | { 9 | assert(!evtimer_pending(&t->event, NULL)); 10 | Block_release(t->cb); 11 | free(t); 12 | } 13 | 14 | void evtimer_callback(evutil_socket_t fd, short events, void *arg) 15 | { 16 | timer *t = (timer*)arg; 17 | t->cb(); 18 | if (!(event_get_events(&t->event) & EV_PERSIST)) { 19 | timer_free(t); 20 | } 21 | } 22 | 23 | void timer_cancel(timer *t) 24 | { 25 | if (!t) { 26 | return; 27 | } 28 | evtimer_del(&t->event); 29 | timer_free(t); 30 | } 31 | 32 | timer* timer_new(network *n, uint64_t timeout_ms, short events, timer_callback cb) 33 | { 34 | timer *t = alloc(timer); 35 | t->cb = Block_copy(cb); 36 | if (event_assign(&t->event, n->evbase, -1, events, evtimer_callback, t)) { 37 | timer_free(t); 38 | return NULL; 39 | } 40 | if (timeout_ms) { 41 | timeval timeout = { 42 | .tv_sec = timeout_ms / 1000, 43 | .tv_usec = (timeout_ms % 1000) * 1000 44 | }; 45 | evtimer_add(&t->event, &timeout); 46 | } else { 47 | event_active(&t->event, 0, 0); 48 | } 49 | return t; 50 | } 51 | 52 | timer* timer_start(network *n, uint64_t timeout_ms, timer_callback cb) 53 | { 54 | return timer_new(n, timeout_ms, 0, cb); 55 | } 56 | 57 | timer* timer_repeating(network *n, uint64_t timeout_ms, timer_callback cb) 58 | { 59 | return timer_new(n, timeout_ms, EV_PERSIST, cb); 60 | } 61 | -------------------------------------------------------------------------------- /timer.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIMER_H__ 2 | #define __TIMER_H__ 3 | 4 | #include 5 | 6 | #include 7 | 8 | typedef struct timer timer; 9 | typedef void (^timer_callback)(void); 10 | 11 | #include "network.h" 12 | 13 | 14 | struct timer { 15 | event event; 16 | timer_callback cb; 17 | }; 18 | 19 | timer* timer_start(network *n, uint64_t timeout_ms, timer_callback cb); 20 | timer* timer_repeating(network *n, uint64_t timeout_ms, timer_callback cb); 21 | void timer_cancel(timer *t); 22 | 23 | #endif // __TIMER_H__ 24 | -------------------------------------------------------------------------------- /ui.h: -------------------------------------------------------------------------------- 1 | #ifndef __UI_H__ 2 | #define __UI_H__ 3 | 4 | void ui_display_stats(const char *type, uint64_t direct, uint64_t peers) __attribute__((weak)); 5 | 6 | #endif // __UI_H__ 7 | --------------------------------------------------------------------------------