Compare commits

...

1861 Commits

Author SHA1 Message Date
vladimir.kuznetsov
4723019624 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2024-01-31 12:42:19 +07:00
vladimir.kuznetsov
1be9078b6c added break after each line in errorstrings 2024-01-31 12:42:05 +07:00
pokamest
520658a295 Merge pull request #550 from amnezia-vpn/KsZnak-patch-1
Ks znak patch 1
2024-01-30 15:58:50 -08:00
pokamest
b9ec722abb Merge pull request #543 from amnezia-vpn/KsZnak-patch-7
Update PageSettingsSplitTunneling.qml
2024-01-30 15:57:40 -08:00
pokamest
d917c798d7 Merge pull request #544 from amnezia-vpn/KsZnak-patch-8
Update PageSettingsAbout.qml
2024-01-30 15:57:10 -08:00
pokamest
0d168c039f Merge pull request #545 from amnezia-vpn/KsZnak-patch-6
Update PageSettingsSplitTunneling.qml
2024-01-30 15:56:50 -08:00
pokamest
af8f265555 Merge pull request #546 from amnezia-vpn/KsZnak-patch-5
Update PageSettingsConnection.qml
2024-01-30 15:56:29 -08:00
pokamest
c0e0d64284 Merge pull request #547 from amnezia-vpn/KsZnak-patch-4
Update PageServiceTorWebsiteSettings.qml
2024-01-30 15:56:02 -08:00
pokamest
9466a71141 Merge pull request #548 from amnezia-vpn/KsZnak-patch-3
Update PageProtocolOpenVpnSettings.qml
2024-01-30 15:55:29 -08:00
pokamest
d28a586a97 Merge pull request #549 from amnezia-vpn/KsZnak-patch-2
Update containers_defs.cpp
2024-01-30 15:55:04 -08:00
pokamest
6fde0b6663 Merge pull request #551 from amnezia-vpn/KsZnak-change-eng-text
Update PageSetupWizardCredentials.qml
2024-01-30 15:54:10 -08:00
KsZnak
d143b9213b Update PageSettingsAbout.qml 2024-01-30 20:50:30 +02:00
KsZnak
16433e9e46 Update PageSettingsSplitTunneling.qml 2024-01-30 20:40:11 +02:00
KsZnak
39479d1999 Update PageSettingsSplitTunneling.qml 2024-01-30 20:35:05 +02:00
KsZnak
a03b766e33 Update PageSettingsConnection.qml 2024-01-30 20:27:01 +02:00
KsZnak
7df2655ba0 Update PageServiceTorWebsiteSettings.qml 2024-01-30 20:22:26 +02:00
KsZnak
5c2ca9803d Update PageProtocolOpenVpnSettings.qml 2024-01-30 20:08:14 +02:00
KsZnak
4e6af947fa Update containers_defs.cpp 2024-01-30 20:05:18 +02:00
pokamest
f412ac6260 Merge pull request #537 from amnezia-vpn/ios-log-3
Disable ioslogger (due memory leak)
2024-01-29 11:37:17 -08:00
pokamest
b45517bafd Merge pull request #444 from amnezia-vpn/feature/killswitch
Kill Switch for desktop client
2024-01-29 11:23:23 -08:00
pokamest
bda64fa391 Merge pull request #536 from amnezia-vpn/bugfix/revoke-openvpn-client
fixed cache clearing when deleting admin configure
2024-01-29 07:31:09 -08:00
vladimir.kuznetsov
e7040f7cc8 specified error codes 2024-01-29 21:33:35 +07:00
pokamest
229970e799 Merge pull request #542 from amnezia-vpn/KsZnak-patch-2
Update amneziavpn_ru.ts
2024-01-28 13:10:49 -08:00
KsZnak
7b0a9a055f Update amneziavpn_ru.ts 2024-01-28 21:46:20 +02:00
pokamest
06d370f716 Merge pull request #541 from amnezia-vpn/version-bump
Version bump 4.2.1.1
2024-01-28 07:23:58 -08:00
albexk
ce0a4f1f96 Version bump 4.2.1.1 2024-01-28 17:29:54 +03:00
vladimir.kuznetsov
3240aa3cb3 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2024-01-28 21:24:23 +07:00
pokamest
5c5935c738 Merge pull request #539 from amnezia-vpn/bugfix/android
Fix Android bugs
2024-01-28 05:25:38 -08:00
pokamest
00b2b1abcd Merge pull request #529 from amnezia-vpn/bugfix/container-selection-after-cleanup-server
fixed first container selection on HomeContainersListView after server cleanup
2024-01-28 02:56:16 -08:00
Mykola Baibuz
e0891e1a15 Change license text 2024-01-28 05:39:12 -05:00
vladimir.kuznetsov
f7df621c56 fixed cache clearing when deleting admin configure
- added permissions for the crl.pem file
2024-01-27 18:09:14 +03:00
albexk
0b6dc5bcfc Add unbinding and destroying vpn service after disconnection 2024-01-27 17:34:57 +03:00
albexk
cbd6755aa5 Fix OpenVpn over Cloak 2024-01-27 17:30:56 +03:00
albexk
3afbc248b1 Refactor split-tunneling: separate site addresses from routes 2024-01-27 17:28:31 +03:00
Mykola Baibuz
30af81fe0a Move linuxfirewall header to "headers" part 2024-01-27 07:59:36 -05:00
Mykola Baibuz
427b43c99b Add code license 2024-01-27 07:50:50 -05:00
KsZnak
ed08ac6b46 Update containers_defs.cpp 2024-01-27 00:58:40 +02:00
KsZnak
1a2c1fa1b5 Update PageSetupWizardCredentials.qml 2024-01-27 00:18:17 +02:00
Igor Sorokin
709fbac231 Disable ioslogger (due memory leak) 2024-01-25 19:07:22 +03:00
pokamest
6b80a56f92 Merge pull request #530 from amnezia-vpn/bugfix/admin-user-clinet-management
fixed adding admin user to client management
2024-01-25 01:58:39 -08:00
Mykola Baibuz
5c9d45a8a8 Use MacOS logic for LinuxFirewall 2024-01-24 17:20:50 -05:00
pokamest
2edac24945 Merge pull request #532 from amnezia-vpn/bugfix/issue485
Fix autostart for Linux Desktop
2024-01-24 11:32:37 -08:00
albexk
b68c9cc145 Fix the double extension of the config file name: 'amnezia_config.vpn.vpn' 2024-01-24 17:00:48 +03:00
albexk
6f02d4eb62 Remove useless 'Open folder with logs' button for Adnroid too 2024-01-24 16:34:37 +03:00
pokamest
6e60688e70 Merge pull request #533 from amnezia-vpn/bugfix/easy-setup-random-port
random ports are now used for easy setup
2024-01-24 05:20:17 -08:00
vladimir.kuznetsov
140b5c4292 random ports are now used for easy setup 2024-01-24 12:27:11 +07:00
pokamest
8ee2ebbd20 Merge pull request #531 from amnezia-vpn/ios-log-2
Fix/iOS log (Part 2)
2024-01-23 14:18:17 -08:00
Igor Sorokin
b3eda4106d Fix: Share view is not showing on iPadOS 2024-01-23 23:41:08 +03:00
Mykola Baibuz
885e22be7c Fix autostart for Linux Desktop 2024-01-23 15:17:07 -05:00
vladimir.kuznetsov
83ec073734 fixed adding admin user to client management 2024-01-24 00:33:19 +07:00
vladimir.kuznetsov
0160b0f9dc editServer now does not update the whole model, but only the modified element 2024-01-23 23:57:14 +07:00
vladimir.kuznetsov
f55bd5e1a1 fixed first container selection on HomeContainersListView after server cleanup 2024-01-23 23:56:16 +07:00
Igor Sorokin
4d88eb8e79 Try to expand 'internal error' 2024-01-23 18:41:33 +03:00
Mykola Baibuz
874de74ac8 Add exclusion for VPN Server host (MacOS/OpenVPN) 2024-01-22 20:32:40 +02:00
pokamest
b3a4b34d48 Merge pull request #524 from amnezia-vpn/KsZnak-patch-1
Update amneziavpn_ru.ts
2024-01-22 07:27:45 -08:00
KsZnak
ec4574bfcf Update amneziavpn_ru.ts 2024-01-22 01:52:14 +02:00
pokamest
73cfab166f Merge pull request #523 from amnezia-vpn/fix/ios-log
Fix/iOS log (Part 1)
2024-01-21 13:02:28 -08:00
Igor Sorokin
0e8f85057d Remove distracting 'stale focus object' records from log 2024-01-21 21:15:34 +03:00
Igor Sorokin
2e4908c557 Records detailed disconnect error info to log 2024-01-21 20:41:06 +03:00
Igor Sorokin
401784414a Fix: 'OpenVPN' is recorded to the log instead of 'WireGuard' 2024-01-21 19:05:24 +03:00
Igor Sorokin
8495124bc8 Remove useless 'Open folder with logs' button (iOS) 2024-01-21 17:49:24 +03:00
pokamest
ba6ed540f5 Merge pull request #521 from amnezia-vpn/KsZnak-patch-2
Update README.md
2024-01-20 12:16:16 -08:00
KsZnak
19a60ea856 Update README.md
del signal link
2024-01-20 22:13:00 +02:00
pokamest
aecf1b463c Merge pull request #519 from amnezia-vpn/fix/android-deploy
Enable AAB build for all branches
2024-01-20 11:08:24 -08:00
pokamest
ff24ba1011 Merge pull request #518 from amnezia-vpn/fix/android-wgipv6
Fix wg address parameter parsing
2024-01-20 10:57:36 -08:00
albexk
802b708232 Enable AAB build for all branches 2024-01-20 21:49:37 +03:00
pokamest
adeff3efb9 Version bump 4.2.1.0 2024-01-20 18:46:33 +00:00
albexk
0103c1722e Fix wg address parameter parsing 2024-01-20 21:38:58 +03:00
pokamest
f9123e7b71 Merge pull request #516 from amnezia-vpn/bugfix/easy-setup-default-container
fixed easy setup default container selection
2024-01-20 09:18:57 -08:00
pokamest
0f9ed4e69c Merge pull request #515 from amnezia-vpn/fix/android-wg
set wg PresharedKey parameter as optional
2024-01-20 09:16:16 -08:00
vladimir.kuznetsov
9dfc95bac0 fixed easy setup default container selection 2024-01-20 23:28:20 +07:00
albexk
9b7914538f set wg PresharedKey parameter as optional 2024-01-20 18:43:26 +03:00
pokamest
85c9cd260d Merge pull request #514 from amnezia-vpn/fix/android-camera
Hide "QR-code" button from config import menu for Android devices wit…
2024-01-20 07:42:55 -08:00
pokamest
73751cc049 Merge pull request #513 from amnezia-vpn/bugfix/issue499
Fix import of some native WG configs
2024-01-20 07:27:54 -08:00
albexk
2b61c48303 Hide "QR-code" button from config import menu for Android devices without camera 2024-01-20 18:20:06 +03:00
Mykola Baibuz
47b03f2bf4 PSK paramater is not mandatory 2024-01-20 08:44:48 -05:00
albexk
3e02dfef63 Refactoring Android logging (#511)
Refactoring Android logging
2024-01-20 13:40:12 +00:00
Mykola Baibuz
4176d0130a Fix import of some native WG configs 2024-01-20 08:35:24 -05:00
pokamest
f6175c2c69 Merge pull request #512 from amnezia-vpn/fix/line-ending
Fix amnezia_application line-ending
2024-01-20 05:04:22 -08:00
albexk
b8b423ca19 Fix amnezia_application line-ending 2024-01-20 16:02:35 +03:00
pokamest
3702d69b9d Merge branch 'dev' into feature/killswitch 2024-01-19 14:58:28 +00:00
pokamest
3253de9384 Merge pull request #509 from amnezia-vpn/featute/amneziawg-apple
Change to amneziawg-apple
2024-01-19 02:17:02 -08:00
Igor Sorokin
51070635a5 Change to amneziawg-apple 2024-01-19 03:27:44 +03:00
pokamest
9b533f1ba6 Merge pull request #507 from amnezia-vpn/linux-installer
Improve Linux installer
2024-01-18 09:39:00 -08:00
tiaga
9371dd405e Improve Linux installer
Pack installer to a .tar archive in order to save executable bit for `AmneziaVPN_Linux_Installer.bin`.
2024-01-19 00:16:19 +07:00
pokamest
27d8108e55 Merge pull request #501 from amnezia-vpn/feature/api-spit-tunneling
for servers received via api, ignore the split tunneling settings
2024-01-18 08:51:12 -08:00
pokamest
820a3f0b77 Merge pull request #506 from amnezia-vpn/bugfix/client-management-ss-cloak
fixed append/rename/revoke client for cloak and ss on client management panel
2024-01-18 07:09:14 -08:00
pokamest
3d61b20271 Merge pull request #505 from amnezia-vpn/fix/readme
Update README.md
2024-01-18 07:03:08 -08:00
vladimir.kuznetsov
eec81f8124 fixed append/rename/revoke client for cloak and ss on client management panel 2024-01-18 21:29:56 +07:00
Igor Sorokin
d7fbddb97f Update README.md 2024-01-18 17:13:04 +03:00
pokamest
9170cb0318 Merge pull request #498 from amnezia-vpn/sort-installer-containers-first
show installed protocols first in protocols tab
2024-01-18 05:57:16 -08:00
pokamest
76dec6fa9c Merge pull request #504 from amnezia-vpn/feature/android-deploy
Add Android App Bundle build and upload
2024-01-18 05:56:50 -08:00
pokamest
4e3edcfc0a Merge pull request #503 from amnezia-vpn/fix/ipv6
Fix IPv6 problem
2024-01-18 05:56:07 -08:00
albexk
ad21d7ab64 Add Android App Bundle build and upload
Up upload-artifact action to version 4
2024-01-18 16:06:37 +03:00
Igor Sorokin
f576eb509d Fix IPv6 problem 2024-01-18 15:25:36 +03:00
vladimir.kuznetsov
33e229d0b2 added blocking of the page with dns settings for servers received by API 2024-01-17 23:38:20 +07:00
pokamest
78420d617b Merge pull request #502 from amnezia-vpn/fix/android-clipboard
Fix/android clipboard
2024-01-17 07:24:24 -08:00
albexk
2552e33d64 Add Android TextArea clipboard workaround 2024-01-17 17:46:54 +03:00
albexk
301141c755 Remove Android TextField workaround
It has been fixed in Qt 6.5.3, 6.6.0
2024-01-17 17:43:54 +03:00
vladimir.kuznetsov
fac57ac89a for servers received via api, ignore the split tunneling settings 2024-01-17 11:28:57 +07:00
pokamest
da5ad0a845 Merge pull request #500 from amnezia-vpn/fix/android-keyboard
Restore previous Android keyboard behavior
2024-01-16 05:50:28 -08:00
albexk
60aeefe1c2 Restore previous Android keyboard behaviour
There is a Qt bug related to this behaviour: https://bugreports.qt.io/browse/QTBUG-41170
2024-01-16 15:06:34 +03:00
Morteza Sherafati
d527f6a5ce show installed protocols first in protocols tab 2024-01-15 20:18:10 +00:00
pokamest
2802b42747 Merge pull request #491 from amnezia-vpn/bugfix/current-processed-server-selection
fixed current processed server selection after import/install new server
2024-01-15 05:43:34 -08:00
pokamest
66c5d2f0a8 Updated submodule qtkeychain 2024-01-15 10:06:20 +00:00
pokamest
6dbf4ac62c Release 4.2.0.1 2024-01-15 09:28:48 +00:00
pokamest
ae2872830b Updated submodule qtkeychain 2024-01-15 09:20:13 +00:00
pokamest
6f4a3587e4 Merge pull request #495 from amnezia-vpn/feature/update-awg-core
Update AWG core (v0.1.8)
2024-01-14 17:33:10 -05:00
Mykola Baibuz
145f51906e Update AWG core (v0.1.8) 2024-01-14 21:58:53 +02:00
pokamest
12e72bc74b Merge pull request #481 from amnezia-vpn/refactoring/android
Refactor Android open file method
2024-01-13 06:46:25 -05:00
pokamest
65a04799ef Merge branch 'dev' into feature/killswitch 2024-01-11 13:45:56 +00:00
vladimir.kuznetsov
88cd5825d3 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2024-01-11 20:26:06 +07:00
pokamest
ecdad2a315 Merge branch 'dev' into refactoring/android 2024-01-11 13:01:03 +00:00
pokamest
0398ddd6a2 Merge pull request #488 from amnezia-vpn/bugfix/split-tunnel-reset-on-app-reset
bugfix/split-tunnel-reset-on-app-reset
2024-01-11 07:58:04 -05:00
pokamest
50ea4d3b0f Merge pull request #453 from amnezia-vpn/bugfix/windows-crush-on-utf8-symbolos
added conversion using the system locale
2024-01-11 07:51:22 -05:00
pokamest
77be8169f2 Merge pull request #493 from amnezia-vpn/bugfix/secureqsettings-deadlock-2
now value and setValue of secureQSettings are always called in the main thread
2024-01-11 07:48:42 -05:00
lunardunno
7a435f76b6 ArchLinux_support (#463)
Arch linux support (#464)
2024-01-10 20:15:14 +00:00
pokamest
42949e0dea Merge pull request #492 from amnezia-vpn/bugfix/append-client
fixed insert rows count in appendClient function
2024-01-10 12:42:07 -05:00
pokamest
26db423232 Merge pull request #489 from amnezia-vpn/bugfix/remote-links-on-site
added the ability to change the site link via a translation file
2024-01-10 12:40:19 -05:00
vladimir.kuznetsov
645cf52803 now value and setValue of secureQSettings are always called in the main thread 2024-01-10 23:05:22 +07:00
vladimir.kuznetsov
673b8ad5b2 fixed insert rows count in appendClient function 2024-01-10 11:55:32 +07:00
vladimir.kuznetsov
2a03834bb2 fixed current processed server selection after import/install new server 2024-01-09 00:25:18 +07:00
lunardunno
c1b6149e49 Improve servercontroller.cpp for Ubuntu (#482)
Improve servercontroller.cpp for Ubuntu, CentOS, snd Fedora
2024-01-06 16:41:06 +00:00
vladimir.kuznetsov
0690d86e52 added the ability to change the site link via a translation file 2024-01-06 20:42:43 +07:00
vladimir.kuznetsov
bb8a11d110 added reset routeMode when resetting application settings 2024-01-06 20:38:41 +07:00
pokamest
4f7ba4c9a8 Merge pull request #483 from amnezia-vpn/persian_translation
full persian translation
2023-12-30 09:11:08 -05:00
Morteza Sherafati
aa41e4d915 full persian translation 2023-12-30 11:12:54 +00:00
pokamest
bb43b5451f Merge pull request #478 from amnezia-vpn/bugfix/macos-dns-resolve
Fix resolv-update script for MacOS (OpenVPN DNS)
2023-12-28 14:52:28 -05:00
vladimir.kuznetsov
69dd415ab5 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into bugfix/windows-crush-on-utf8-symbolos 2023-12-28 14:47:19 +07:00
albexk
e605f549bd Merge branch 'dev' into refactoring/android 2023-12-26 18:23:53 +03:00
albexk
a961932b2e Refactor AndroidUtils 2023-12-26 17:41:49 +03:00
albexk
e8cc80f046 Refactor Android open file method
Fix some bugs with mimetype filters when the Qt mimetype database does not match the Android database
2023-12-26 16:30:33 +03:00
vladimir.kuznetsov
67f29ac483 added conversion using the system locale 2023-12-26 13:36:21 +07:00
pokamest
c9bde5cdc0 Merge pull request #479 from amnezia-vpn/feature/client-management-migrations
added migration from version 3 of client management to version 4
2023-12-25 22:00:13 -05:00
pokamest
e878911819 Merge pull request #472 from amnezia-vpn/ksznak
Update amneziavpn_ru.ts
2023-12-25 13:36:03 -05:00
pokamest
f1a0b7f0ef Merge pull request #473 from amnezia-vpn/bugfix/new-client-on-connection
fixed hang after creating configuration on connection
2023-12-25 12:21:44 -05:00
KsZnak
3e0a5104e7 Update amneziavpn_ru.ts 2023-12-25 19:18:23 +02:00
vladimir.kuznetsov
8f53d563a4 moved the client table for cloak and ss to the openvpn folder 2023-12-25 22:49:24 +07:00
pokamest
414740ffb7 Merge pull request #467 from amnezia-vpn/feature/full-access-last-config
full access config no longer contains the last_config field
2023-12-25 10:29:16 -05:00
albexk
7437d47d92 Remove unnecessary permission RECEIVE_BOOT_COMPLETED 2023-12-25 15:16:22 +03:00
vladimir.kuznetsov
a68f19d72f added migration from version 3 of client management to version 4 2023-12-24 21:13:09 +07:00
vladimir.kuznetsov
11641c5e22 added error code output 2023-12-24 21:11:47 +07:00
Mykola Baibuz
8d3e21d46a Fix resolv-update script for MacOS (OpenVPN DNS)
script from https://github.com/andrewgdotcom/openvpn-mac-dns
2023-12-23 23:14:02 +02:00
pokamest
5ad54bfdc1 Merge pull request #452 from amnezia-vpn/refactoring/android
Android refactoring
2023-12-23 13:48:26 -05:00
Mykola Baibuz
a8f5e95fb1 MacOS OpenVPN/OpenVPN over Cloak killswitch 2023-12-23 16:04:17 +02:00
Mykola Baibuz
a4f3d08c02 Fix PF config path 2023-12-23 14:21:13 +02:00
Mykola Baibuz
3d2174d84e MacOS WG/AWG killswitch 2023-12-23 12:51:55 +02:00
pokamest
12fbc7d258 Merge pull request #474 from amnezia-vpn/bugfix/ss-in-cloak-container
returned shadowsocks to cloak container
2023-12-22 15:04:21 +00:00
albexk
164b7e2551 Merge branch 'dev' into refactoring/android 2023-12-22 15:38:29 +03:00
albexk
eafac491d8 Add a stub for errors coming from Android
These errors are related to VPN connection errors
2023-12-22 15:35:24 +03:00
pokamest
3cfb6e968d Merge pull request #475 from amnezia-vpn/bugfix/default-server-full-access-sharing
added selection of a default server for full access sharing
2023-12-22 12:21:59 +00:00
albexk
375825125f Fix cloak config 2023-12-22 15:11:48 +03:00
vladimir.kuznetsov
a8520e7545 added selection of a default server for full access sharing 2023-12-22 13:43:46 +07:00
vladimir.kuznetsov
ac154cdd83 returned shadowsocks to cloak container 2023-12-22 13:08:53 +07:00
vladimir.kuznetsov
9290775ab5 added removal of last_config when revoke admin config on client management panel 2023-12-21 23:34:27 +07:00
pokamest
d14e8cdee4 Merge pull request #460 from amnezia-vpn/bugfix/minor-ui-fixes
added an empty string check for the server name and user name change fields
2023-12-21 15:55:33 +00:00
vladimir.kuznetsov
7aac9f9d0e fixed hang after creating configuration on connection
- config created on connection is displayed as admin (platform name) on the client management page
- added config creation time on the client management page
2023-12-21 17:47:34 +07:00
KsZnak
41aaac7d32 Update amneziavpn_ru.ts 2023-12-20 20:16:35 +02:00
albexk
c8d2399db9 Merge branch 'dev' into refactoring/android 2023-12-20 20:47:19 +03:00
KsZnak
f37c8e5fd4 Update amneziavpn_ru.ts 2023-12-20 19:14:15 +02:00
pokamest
9f5025c10b Merge pull request #471 from amnezia-vpn/bugfix/macos_deploy_fix
build_macos.sh fix
2023-12-20 17:13:37 +00:00
pokamest
c27d999c41 build_macos.sh fix 2023-12-20 08:39:43 -08:00
pokamest
9681bea237 Update ts files 2023-12-20 12:14:06 +00:00
pokamest
8905d6352c Merge pull request #465 from amnezia-vpn/persian_translation
added persian translation file and menu item
2023-12-20 12:07:51 +00:00
vladimir.kuznetsov
8599b20678 full access config no longer contains the last_config field 2023-12-18 13:17:39 +07:00
Morteza Sherafati
491f09a51b added persian translation file and menu item 2023-12-17 18:37:07 +00:00
pokamest
0f1519a21f Merge pull request #462 from amnezia-vpn/bugfix/service-containers-search
fixed server search for sftp, dns and tor containers
2023-12-17 16:53:52 +00:00
Mykola Baibuz
1a17f2956a Fix build action 2023-12-16 10:05:54 -05:00
Mykola Baibuz
d94e27bfa9 Linux killswitch 2023-12-16 09:19:04 -05:00
vladimir.kuznetsov
b892156092 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-12-16 09:23:44 +07:00
vladimir.kuznetsov
7b1b8dc749 fixed server search for sftp, dns and tor containers 2023-12-15 13:58:30 +07:00
albexk
6d0167dcf3 Get back the ability to open configuration files
Doesn't work in all applications because some applications pass an abstract URI instead of the file path in the 'content' scheme
2023-12-14 22:10:22 +03:00
albexk
0c2d661e1c Disable ShadowSocks support on Android 2023-12-14 21:08:45 +03:00
albexk
95d1440d6f Some minor refactoring 2023-12-14 18:01:55 +03:00
albexk
0cabf60dc4 Fixes and refactoring in file saving and import functions 2023-12-14 18:00:58 +03:00
albexk
836ca1cc6b Switch to Qt fileprovider introduced in 6.6 2023-12-14 17:59:03 +03:00
pokamest
be799daafe Merge pull request #431 from amnezia-vpn/re_second_adaptation_to_diff_os
Improve install_docker.sh
2023-12-14 05:27:29 -08:00
pokamest
ad9d674a03 Merge pull request #368 from amnezia-vpn/feature/import-config-from-cloud
API support
2023-12-14 04:15:38 -08:00
vladimir.kuznetsov
f52c3c430f added notification after config revokation 2023-12-14 11:03:27 +07:00
vladimir.kuznetsov
a91ab0e910 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-12-13 14:21:51 +07:00
vladimir.kuznetsov
39d1f1677f fixed description update, after changing the default protocol 2023-12-13 14:14:37 +07:00
albexk
b0dcae3586 Disable global split tunneling if a non-default route exists in the Wireguard configuration 2023-12-12 22:48:18 +03:00
vladimir.kuznetsov
ed6351f8f1 added an empty string check for the server name and user name change fields 2023-12-12 17:15:10 +03:00
pokamest
e486a2fb26 Merge pull request #443 from amnezia-vpn/feature/cancel-installation-button
added a button to cancel installation if the package manager on the server is busy
2023-12-12 05:17:40 -08:00
albexk
195bdb947e Refactor import config
Remove the path filter, as the content path may not contain a filename.
Disable import when viewing files.
Config can be imported from:
- shared file
- shared text
- vpn:// link
2023-12-11 22:56:01 +03:00
albexk
1576aed1ea Add network state listening and reconnection
Vpn reconnects when the default network is changed
2023-12-11 15:16:50 +03:00
vladimir.kuznetsov
e66fbc3289 added default container installation, after downloading the config from the api 2023-12-11 13:42:42 +07:00
vladimir.kuznetsov
b4c89ad58f Reworked the interaction between models. Now only serversModel directly interacts with server config 2023-12-08 13:50:03 +07:00
albexk
8cc5846808 Fix application hangs in disconnection state 2023-12-07 22:43:33 +03:00
albexk
2eaaf01ca1 Up AGP to version 8.2.0 2023-12-07 19:28:41 +03:00
albexk
67694c0f96 Fix abort error: 'Pure virtual function called!' 2023-12-06 18:25:11 +03:00
albexk
163e5b2c52 Fix for Qt Creator 2023-12-06 18:25:11 +03:00
albexk
508f1d3a42 Add service bind timeout 2023-12-06 18:24:52 +03:00
albexk
d2207a5255 Up Gradle to version 8.5 2023-12-06 13:38:36 +03:00
albexk
bf03f5c9ae Fix for Qt Creator 2023-12-05 23:53:49 +03:00
albexk
656223f57d Fix rebinding to the service 2023-12-05 16:57:53 +03:00
albexk
dc6e3ec53b Add passing the VPN connection status when rebinding to the service 2023-12-05 16:10:29 +03:00
albexk
5835a756ce Add onError callback to handle errors in protocol threads 2023-12-05 13:56:01 +03:00
vladimir.kuznetsov
f3f98a50ed fixed include path of servercontroller 2023-12-05 17:49:11 +07:00
vladimir.kuznetsov
0f4bb78712 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-12-05 17:38:53 +07:00
vladimir.kuznetsov
c4014518cb renamed CloudController to ApiController 2023-12-05 17:38:38 +07:00
vladimir.kuznetsov
3605f62feb added support for the updated api 2023-12-05 17:28:14 +07:00
albexk
5c3e253067 Fix service description in AndroidManifest.xml 2023-12-05 13:09:28 +03:00
albexk
8d43cee52e Remove shadowsocks code 2023-12-04 18:45:53 +03:00
albexk
1e64413904 Fix disconnect bug 2023-12-04 18:23:08 +03:00
pokamest
6fd1ea26ee Merge pull request #438 from amnezia-vpn/bugfix/app-is-running-win11
fixed appProcessIsRunning() for win11
2023-12-01 03:24:49 -08:00
vladimir.kuznetsov
e619fd4af9 replaced loader with PageSetupWizardInstalling when updating container settings 2023-12-01 14:16:27 +07:00
albexk
e7658f9859 Add split tunneling 2023-12-01 00:12:50 +03:00
vladimir.kuznetsov
3defb09da9 added a button to cancel installation if the package manager on the server is busy 2023-11-30 19:21:57 +07:00
vladimir.kuznetsov
a672434909 changed tasklist | findstr на tasklist 2023-11-30 07:13:43 +03:00
Mykola Baibuz
c3fdd977b1 Windows OpenVPN/OpenVPN+Cloak killswitch feature 2023-11-29 22:50:36 +02:00
pokamest
dd233f77fc Merge pull request #432 from amnezia-vpn/feature/client-management
added client management
2023-11-29 07:04:56 -08:00
vladimir.kuznetsov
02efd9c217 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/client-management 2023-11-29 17:26:26 +03:00
albexk
20f3c0388a Add sending statistics 2023-11-29 17:08:53 +03:00
albexk
ef530780bd Fixes in AmneziaVpnService 2023-11-29 17:01:21 +03:00
albexk
d7ec611ff4 Fix bugs in awg and wireguard protocols 2023-11-29 16:55:17 +03:00
pokamest
b897e7102e Merge pull request #437 from amnezia-vpn/bugfix/minor-ui-fixes
Bugfix/minor UI fixes
2023-11-29 05:34:30 -08:00
pokamest
1cc5c5384e Merge pull request #407 from amnezia-vpn/feature/ss-and-cloak-native-configs
added native config generation for ss and cloak
2023-11-29 05:28:33 -08:00
vladimir.kuznetsov
db602ac65b fixed ss string generation 2023-11-29 10:57:47 +07:00
albexk
eaa209bc3a Add OpenVpn over Cloak module 2023-11-28 22:27:00 +03:00
albexk
51d4aea9e2 Add OpenVpn module 2023-11-28 20:07:39 +03:00
albexk
9738ada946 ProtocolApi refactoring, move network classes to NetworkUtils.kt 2023-11-28 19:47:22 +03:00
albexk
8ec105bee0 Move Log class to org.amnezia.vpn.util package 2023-11-28 19:07:32 +03:00
tiaga
4fd0852bb3 Improve install_docker.sh
- add delays before and after Docker activation
- cancel installation if `sudo` wasn't found
2023-11-27 21:47:54 +07:00
vladimir.kuznetsov
a53e904f7b fixed appProcessIsRunning() for win11 2023-11-27 13:56:52 +07:00
vladimir.kuznetsov
2d22b52b5d limited client name length 2023-11-27 13:42:08 +07:00
vladimir.kuznetsov
426ac49f6f fixed "auto-connect" option 2023-11-27 12:46:59 +07:00
vladimir.kuznetsov
c164814abd fixed default server setting after importing 2023-11-27 10:59:48 +07:00
vladimir.kuznetsov
3084892ed8 added selection of default server and container on the sharing page 2023-11-26 21:15:58 +07:00
albexk
9297f877c4 Add AWG module 2023-11-26 13:07:31 +03:00
vladimir.kuznetsov
1bf808c9ee fixed qr code generation for native configs 2023-11-25 13:02:02 +07:00
albexk
91f44fb394 Up Qt to version 6.6.1 2023-11-24 22:22:15 +03:00
albexk
385a52f676 Vpn service refactoring 2023-11-24 21:51:09 +03:00
albexk
8ef16781eb Remove old wireguard code 2023-11-24 21:49:54 +03:00
albexk
ad5ea1ca44 Add IpcMessenger class 2023-11-24 17:10:08 +03:00
albexk
0ba5d754d5 Android Activity refactoring 2023-11-23 21:20:31 +03:00
albexk
ccdcfdce8a Remove VPNPermissionHelper class 2023-11-23 16:49:32 +03:00
albexk
712fb4d0d3 Add Wireguard module 2023-11-23 16:45:15 +03:00
albexk
de65a03998 Add ProtocolApi module 2023-11-23 16:03:52 +03:00
albexk
6d6710db4a Prefs refactoring 2023-11-23 14:19:51 +03:00
albexk
c34c3e51ea Remove 'https://jitpack.io' repository 2023-11-23 14:13:38 +03:00
vladimir.kuznetsov
5dc3b64e0b added search bar for client management page 2023-11-23 14:54:49 +07:00
vladimir.kuznetsov
e8ceeb6e20 added full access sharing 2023-11-23 00:04:06 +07:00
pokamest
d38c7ce6a5 Error codes cleanup 2023-11-22 13:57:05 +00:00
albexk
e625543b94 CameraActivity refactoring 2023-11-21 23:35:26 +03:00
albexk
679bd4e4c9 Get rid of AppCompat theme 2023-11-21 21:31:49 +03:00
vladimir.kuznetsov
c6a312845a added client management 2023-11-21 20:31:53 +07:00
pokamest
ef0530ec6b Merge pull request #420 from amnezia-vpn/adaptation_to_different_os
Improve logic of install_docker.sh
2023-11-17 11:51:58 -08:00
albexk
2c98a90d60 Move icons to mipmap folders 2023-11-17 15:30:13 +03:00
albexk
b90fad6664 Android activity and AndroidController class refactoring 2023-11-17 15:10:11 +03:00
albexk
5a5ea4a018 Android project restructuring 2023-11-16 20:16:28 +03:00
albexk
bc68c487ee Update to qt 6.6.0 2023-11-16 19:49:36 +03:00
albexk
617cdf14ad Log class refactoring 2023-11-16 15:30:44 +03:00
albexk
f1c970461f Create utils module, move Log class there
BuildConfig class is now only created in the utils module
2023-11-16 15:15:02 +03:00
albexk
2fde47a86f Move qt binding java code to a separate module 2023-11-15 22:10:44 +03:00
albexk
4e5f2f44b6 Detach shadowsocks module 2023-11-15 22:08:00 +03:00
pokamest
e8a2e54d05 Typo fix 2023-11-15 12:51:39 +00:00
albexk
d77f3ecee8 Fix build error 2023-11-15 15:48:40 +03:00
albexk
06776ebe8f Fix errors 2023-11-14 23:19:46 +03:00
albexk
e1eec55f62 Refactoring build
Move to gradle kotlin DSL
Use gradle version catalog
All android build parameters are set via cmake files
Use gradle abi split to build APKs
Improve local development in the android project folder
2023-11-14 23:18:59 +03:00
albexk
fcabf08e74 Update gradle, fix gradlew.bat crlf 2023-11-14 23:13:14 +03:00
pokamest
b4694313a0 Merge pull request #426 from amnezia-vpn/ios-build
Change Qt mirror for builds
2023-11-14 09:54:54 -08:00
tiaga
abb2cae1f8 Change Qt mirror for builds
Use UC Berkeley mirror for installing Qt during a build. In addition, don't trigger builds on a tag push.
2023-11-14 23:39:15 +07:00
pokamest
b0004fd9dc Version bump 2023-11-14 12:50:52 +00:00
tiaga
362a82f944 Improve logic of install_docker.sh
- check packages update only when it's required
- avoid `dnf/yum update` for RHEL-based systems
2023-11-14 16:57:16 +07:00
pokamest
19fe61ed29 Merge pull request #423 from amnezia-vpn/r2
Upload new versions to R2
2023-11-13 09:34:30 -08:00
tiaga
72de38b4fb Upload new versions to R2
A new GitHub Actions workflow for a tagged commit which uploads installers for a desktop version to Cloudflare R2.
2023-11-10 23:19:00 +07:00
pokamest
02c0f96e5e Merge pull request #418 from amnezia-vpn/feature/split-tunnel-dns-forwad
Use DNS over VPN for ForwardSites mode split tunnel
2023-11-07 06:35:43 -08:00
vladimir.kuznetsov
aee82282ac Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/import-config-from-cloud 2023-11-06 14:10:43 +03:00
vladimir.kuznetsov
8497aeeb91 removed the debugging code 2023-11-06 14:10:31 +03:00
Mykola Baibuz
5e9f688000 Use DNS over VPN for ForwardSites mode split tunnel
This feature was in previous version of Split Tunnel
2023-11-04 15:28:59 -04:00
pokamest
6a7e346695 Merge pull request #416 from amnezia-vpn/bugfix/openvpn-exclude-route
Fix Split tunnel exclude sites mode for OpenVPN and Cloak. Windows.
2023-11-04 06:09:01 -07:00
Mykola Baibuz
071738116e Update Windows OpenVPN binary
This binary builded with ENABLE_DEBUG flag. This flag needed for ROUTE_GATEWAY varible output in log.
2023-11-03 17:29:40 -04:00
pokamest
147726ecb0 Merge branch 'dev' into feature/import-config-from-cloud 2023-11-01 21:42:07 +00:00
pokamest
ae4ee6431d Merge pull request #409 from useribs/patch-2
Update servercontroller.cpp, replace 2 calls (shred ; rm)  with one
2023-11-01 12:23:14 -07:00
vladimir.kuznetsov
9cfcb714ae added native config generation for ss and cloak 2023-11-01 21:29:58 +05:00
pokamest
d1ccde2a4b Merge pull request #396 from amnezia-vpn/bugfix/server-config-sync
bugfix/server config sync
2023-11-01 07:15:10 -07:00
useribs
4848091203 Update servercontroller.cpp, replace 2 calls (shred ; rm) with one (shred -u) 2023-10-30 20:09:13 +03:00
pokamest
282f159311 Merge pull request #402 from amnezia-vpn/bugfix/description_dns
Update DNS description
2023-10-29 09:07:42 -07:00
lunardunno
4ef8c77a2d Update DNS description 2023-10-29 17:56:10 +04:00
pokamest
08c1cf2439 Merge pull request #382 from amnezia-vpn/feature/split-tunnel-mobile
Split tunnel for missed Protocol/OS
2023-10-29 06:26:07 -07:00
Mykola Baibuz
2fc33875bb Bump version 2023-10-27 15:38:24 -04:00
Mykola Baibuz
9e92e4b5ff Merge branch 'dev' into feature/split-tunnel-mobile 2023-10-27 15:37:28 -04:00
pokamest
7f2cf70bf5 Merge pull request #393 from amnezia-vpn/bugfix/return-after-installation
fixed page return after installation
2023-10-26 12:40:39 -07:00
pokamest
40725d4155 Merge pull request #397 from amnezia-vpn/dev
Release 4.0.8
2023-10-26 11:45:11 -07:00
vladimir.kuznetsov
8164026891 fixed server config update, after container config change 2023-10-26 23:37:51 +05:00
Mykola Baibuz
0e23b3a1ac Allow traffic to Amezia DNS for all OS 2023-10-25 22:19:07 +03:00
Mykola Baibuz
1739d4861e Allow acces to Amnezia DNS when used only for selected sites 2023-10-25 21:50:35 +03:00
Mykola Baibuz
a6b6e7850d Allow traffic for excluded route on Windows kill switch 2023-10-24 23:07:07 +03:00
Mykola Baibuz
3e9dea6f07 Remove some not implemented notification 2023-10-24 13:37:40 +03:00
Mykola Baibuz
1b37ca805f Cleanup debug stuff 2023-10-24 11:10:16 +03:00
Mykola Baibuz
c772f56da7 Fixes after merge 2023-10-24 11:00:40 +03:00
Mykola Baibuz
bc183e39bb Merge branch 'feature/split-tunnel-mobile' of github.com:amnezia-vpn/amnezia-client into feature/split-tunnel-mobile 2023-10-24 00:35:58 +03:00
Mykola Baibuz
306d4f70a8 Update NE Sources 2023-10-24 00:33:35 +03:00
Mykola Baibuz
a386d39495 iOS Cloak/OVPN SplitTunnel 2023-10-24 00:28:41 +03:00
Mykola Baibuz
22b14dff5f iOS AWG/WG split tunnel 2023-10-23 22:42:02 +03:00
pokamest
e749cc7578 Update amneziavpn_ru.ts
Typo fix
2023-10-23 20:32:28 +01:00
vladimir.kuznetsov
3e03002ead added getting cloud config for cloak 2023-10-23 23:55:01 +05:00
vladimir.kuznetsov
4ae9cddcce fixed a typo in the serverController include 2023-10-23 23:53:46 +05:00
vladimir.kuznetsov
16724645ce Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/import-config-from-cloud 2023-10-23 21:40:18 +05:00
vladimir.kuznetsov
6a12cad1c9 fixed page return after installation 2023-10-23 21:33:07 +05:00
Mykola Baibuz
c15665803d Merge branch 'dev' into feature/split-tunnel-mobile 2023-10-22 15:26:20 -04:00
pokamest
97090888d5 Bump version 2023-10-22 08:11:37 -07:00
pokamest
4642308fbb Merge pull request #374 from amnezia-vpn/bugfix/split-tunneling
Bugfix/split tunneling
2023-10-22 08:02:43 -07:00
vladimir.kuznetsov
59bccb1188 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into bugfix/split-tunneling 2023-10-22 20:00:39 +05:00
pokamest
cd8fc007ac Merge pull request #392 from amnezia-vpn/bugfix/existing-awg-container
added getting awg parameters when adding an already installed awg container
2023-10-22 07:49:34 -07:00
vladimir.kuznetsov
7cfb38307e removed re-processing of server config for awg 2023-10-22 18:04:34 +05:00
vladimir.kuznetsov
994aa32745 added getting awg parameters when adding an already installed awg container 2023-10-22 17:31:13 +05:00
Mykola Baibuz
f0b872e86b Merge remote-tracking branch 'origin/bugfix/pull-awg-config' into feature/split-tunnel-mobile 2023-10-21 23:24:54 +03:00
Mykola Baibuz
0c33432436 Fix pulling exiting AWG config from server 2023-10-21 14:55:15 -04:00
pokamest
0bb4dd9442 Text and translations fixes 2023-10-21 18:32:30 +01:00
pokamest
7a54dc15da Update amneziavpn_ru.ts 2023-10-21 16:33:21 +01:00
pokamest
e16a1100d8 Update amneziavpn_ru.ts 2023-10-21 16:20:57 +01:00
pokamest
99214e22e3 Fix docs url 2023-10-21 16:05:09 +01:00
pokamest
c77d35a2ed Merge pull request #390 from amnezia-vpn/revert-370-feature/custom_drawer_component
Revert "added new drawer2type for replacing drawertype"
2023-10-21 06:21:07 -07:00
pokamest
d98fdbdc5c Revert "added new drawer2type for replacing drawertype" 2023-10-21 14:17:45 +01:00
ronoaer
4551cf0a21 Merge pull request #370 from amnezia-vpn/feature/custom_drawer_component
added new drawer2type for replacing drawertype
2023-10-21 09:34:21 +08:00
ronoaer
023c3474d2 Merge branch 'dev' into feature/custom_drawer_component 2023-10-21 09:28:41 +08:00
pokamest
2a4cefb4bf Merge pull request #387 from amnezia-vpn/bugfix/awg-mtu-len-fix
Fix MTU len for Win WG/AWG
2023-10-20 15:02:29 -07:00
Mykola Baibuz
09305724fa Fix MTU len for Win WG/AWG 2023-10-20 16:44:30 -04:00
pokamest
360fda1ba7 Merge pull request #386 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
Bugfix/minor UI fixes 4 version
2023-10-20 12:23:03 -07:00
vladimir.kuznetsov
dadf0cf96e Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into dev 2023-10-20 21:51:40 +05:00
vladimir.kuznetsov
3d60ac751e removed the default protocol/server change if connected to VPN 2023-10-20 20:52:14 +05:00
pokamest
32793eef8c Merge pull request #385 from amnezia-vpn/bugfix/translated_new_source_strings_to_chinese
translated new source strings to chinese
2023-10-20 06:36:17 -07:00
ronoaer
da1cdfd6fa translated new source strings to chinese 2023-10-20 18:01:57 +08:00
vladimir.kuznetsov
58ad7dc161 removed the "remove protocol" buttons from where they shouldn't be 2023-10-20 14:10:04 +05:00
ronoaer
0a15f44193 removed states 'opened', 'closed' 2023-10-20 10:38:12 +08:00
pokamest
e1dec3c1ba Merge pull request #384 from amnezia-vpn/bugfix/startCentos7docker
Restoring autostart and enable docker for CentOS 7
2023-10-19 18:30:45 -07:00
pokamest
7834860245 Merge pull request #383 from amnezia-vpn/feature/awg-random-values
Feature/awg random values
2023-10-19 18:28:13 -07:00
pokamest
2da1025f26 Random port on install 2023-10-20 02:25:40 +01:00
Mykola Baibuz
78c83b2e21 Some logic fix 2023-10-19 17:03:24 -04:00
Mykola Baibuz
414a47e2f2 WG/AWG Desktop AllowedIP from plain WG config 2023-10-19 14:50:51 -04:00
ronoaer
6c78b4ec8f enabled drag-pagehome-drawer in tabBar 2023-10-19 23:01:03 +08:00
ronoaer
a6949bd3ae resized questiondrawer of page serverdata 2023-10-19 19:45:22 +08:00
ronoaer
f7bed04ab2 removed invalid function code 2023-10-19 19:32:15 +08:00
ronoaer
6ec773079c added hovering effect of button 2023-10-19 11:22:52 +08:00
ronoaer
366e27a321 re-adatped pagehome 2023-10-19 09:27:39 +08:00
Mykola Baibuz
32c304dc1b WG/AWG SplitTunnel for desktop 2023-10-18 17:44:28 -04:00
vladimir.kuznetsov
338499247d changed the display order of containers 2023-10-19 01:16:36 +05:00
vladimir.kuznetsov
79e1761c1f added generation of random values for awg parameters 2023-10-19 01:14:09 +05:00
Mykola Baibuz
4ea1a19572 Cleanup WG implementation 2023-10-18 13:41:58 -04:00
pokamest
e2ae341ba9 AndroidManifest fix 2023-10-18 14:01:06 +01:00
pokamest
de03435bac Merge pull request #381 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
Bugfix/minor UI fixes 4 version
2023-10-18 04:05:18 -07:00
pokamest
e16c425f87 PageHome.qml fix 2023-10-18 12:04:39 +01:00
ronoaer
c461e00c5c keeping parent's cusorshape and Drawer2Type's close-animation 2023-10-18 16:17:57 +08:00
vladimir.kuznetsov
fcf6bb43b7 Merge branch 'bugfix/split-tunneling' of github.com:amnezia-vpn/amnezia-client into bugfix/split-tunneling 2023-10-18 12:18:46 +05:00
vladimir.kuznetsov
f5f72f87a6 fixed switcher status display for page split site tunneling 2023-10-18 12:17:24 +05:00
vladimir.kuznetsov
3340451245 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into bugfix/split-tunneling 2023-10-18 11:55:24 +05:00
Mykola Baibuz
c14f1b5000 Android OpenVPN/Cloak Split tunnel 2023-10-17 16:39:56 -04:00
vladimir.kuznetsov
a46e55d5c2 added a dash for drawerType 2023-10-18 01:11:41 +05:00
vladimir.kuznetsov
4b64bfaec0 fixed questionDrawer height 2023-10-18 00:37:15 +05:00
vladimir.kuznetsov
2f0c1eeecc fixed selection of default container after installing a new server 2023-10-18 00:36:40 +05:00
Mykola Baibuz
546d4c1d3d WG/AWG Android splitTunnel 2023-10-17 14:54:46 -04:00
lunardunno
160d88f002 Restoring autostart and enable docker for CentOS 7 2023-10-17 21:26:50 +04:00
ronoaer
a83cd29f72 fixed the cursorShape, and some minor issues 2023-10-17 22:00:19 +08:00
pokamest
94304b5777 Version bump 2023-10-17 14:47:31 +01:00
pokamest
61ddfe01a1 macos build script updated [no ci] 2023-10-17 06:39:49 -07:00
pokamest
00d334f704 Merge pull request #377 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
disabled the ability to change the protocol/server when a vpn connection is active
2023-10-17 05:39:51 -07:00
pokamest
f4a4979997 Merge pull request #378 from amnezia-vpn/bugfix/updated_chinese_translations
updated Chinese translations for updating source strings
2023-10-17 05:11:19 -07:00
ronoaer
03171e4743 update background color and drag-effect, moved dulicated code 2023-10-17 19:34:34 +08:00
ronoaer
5369e68267 updated Chinese translations for updating source strings 2023-10-17 14:30:59 +08:00
vladimir.kuznetsov
9eb23e38bd disabled the ability to change the protocol/server when a vpn connection is active 2023-10-16 22:57:12 +05:00
Mykola Baibuz
2a0166bb26 Merge branch 'bugfix/split-tunneling' of https://github.com/amnezia-vpn/amnezia-client into bugfix/split-tunneling 2023-10-16 12:05:50 -04:00
Mykola Baibuz
2df612ec1f Android SplitTunnel 2023-10-16 12:05:35 -04:00
pokamest
36ba3758db Translation updates 2023-10-16 15:27:26 +01:00
ronoaer
7cc0f39d3c adapted pagehome by new custom drawer type 2023-10-16 22:21:01 +08:00
vladimir.kuznetsov
9cf5590371 disabled split site tunneling for awg 2023-10-16 15:17:09 +05:00
pokamest
81f835458f Merge pull request #375 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
Bugfix/minor UI fixes 4 version
2023-10-16 03:10:53 -07:00
vladimir.kuznetsov
e01b1db706 text corrections 2023-10-16 14:34:03 +05:00
vladimir.kuznetsov
cdb18de305 brought back the ability to share wireguard native format configs 2023-10-16 13:43:27 +05:00
vladimir.kuznetsov
8e0eef3316 fixed selection of default container after installing a new container 2023-10-16 13:40:43 +05:00
vladimir.kuznetsov
221d45f564 fixed pageSettingsDns width 2023-10-16 13:32:56 +05:00
vladimir.kuznetsov
2a4a01a4be removed split site tunneling page blocking when switcher is turned off 2023-10-16 13:28:37 +05:00
Mykola Baibuz
501670bdd2 Merge branch 'feature/split-tunneling-config' into bugfix/split-tunneling 2023-10-15 15:10:05 -04:00
vladimir.kuznetsov
24637a1693 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-10-15 21:08:45 +05:00
vladimir.kuznetsov
7bd1340190 fixed display of sites on page split tunneling 2023-10-15 20:41:49 +05:00
ronoaer
cb5c09d967 adapted questionDrawer 2023-10-15 21:29:01 +08:00
pokamest
a01ba5909c Version bump 2023-10-15 12:53:44 +01:00
pokamest
1c4678af95 Merge pull request #373 from amnezia-vpn/fix/update_ru_ts
Updated ru ts #2
2023-10-15 04:43:04 -07:00
pokamest
5f5435c645 Updated ru ts 2023-10-15 12:41:01 +01:00
pokamest
2f7dc2c46c Merge pull request #372 from amnezia-vpn/fix/update_ru_ts
Update ru translation
2023-10-15 04:38:29 -07:00
pokamest
9bc1c9dd03 Merge branch 'dev' into fix/update_ru_ts 2023-10-15 12:30:13 +01:00
pokamest
4c81cdb4a2 Update translation 2023-10-15 12:29:41 +01:00
pokamest
3406ffa7a2 Merge pull request #371 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
Minor UI fixes 4 version
2023-10-15 02:54:27 -07:00
pokamest
6d05b6845e VPN protocol descriptions updated 2023-10-15 10:53:09 +01:00
ronoaer
29b4966119 shown ConnectionTypeSelectionDrawer on top level alway 2023-10-15 17:34:35 +08:00
ronoaer
d0f8358431 removed invalid code, and fixed top button hidden-shown 2023-10-15 17:29:22 +08:00
ronoaer
a75bd07cd8 fixed the clicked event 2023-10-15 15:54:05 +08:00
ronoaer
8c1835950b added transparent-background, for blocking clicked event 2023-10-15 15:17:04 +08:00
pokamest
c7cd8e4c80 Minor ui fixes and refactoring 2023-10-15 02:30:42 +01:00
pokamest
f65e4066e3 ui fixes 2023-10-14 23:59:46 +01:00
vladimir.kuznetsov
37c18c5d3c Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into dev 2023-10-14 21:25:09 +05:00
vladimir.kuznetsov
8885f580b2 added notification after saving backup and logs files 2023-10-14 21:18:38 +05:00
vladimir.kuznetsov
512ac74ee6 temporarily disabled the drawer close button 2023-10-14 20:59:03 +05:00
ronoaer
384ce9853b added new drawer2type for replacing drawertype 2023-10-14 23:00:31 +08:00
pokamest
b6d2030041 Ru translation 2023-10-14 15:55:52 +01:00
pokamest
3ac09181c6 Text lables fixes 2023-10-14 15:55:07 +01:00
vladimir.kuznetsov
ffc9e5823a text corrections 2023-10-14 18:21:49 +05:00
vladimir.kuznetsov
f5448fed59 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into dev 2023-10-14 16:58:14 +05:00
vladimir.kuznetsov
8163e51434 fixes on page split tunneling according to the design layout 2023-10-14 16:52:22 +05:00
pokamest
3836836c72 Change easySetupOrder 2023-10-14 02:15:49 +01:00
vladimir.kuznetsov
b78bf39767 added split tunneling to the config 2023-10-13 15:45:06 +05:00
vladimir.kuznetsov
25f8283edd added getting the config from the cloud service 2023-10-12 20:48:03 +05:00
pokamest
7c8399ce88 Fix awg description 2023-10-12 13:57:58 +01:00
pokamest
9fe2a1dd41 Merge pull request #354 from amnezia-vpn/feature/amnezia-wireguard-client-impl
AWG protocol implementation
2023-10-12 03:39:59 -07:00
Nethius
846f554157 Merge pull request #366 from amnezia-vpn/bigfix/updated_translation_for_wg
updated translations for branch feature/amnezia-wireguard-client-impl
2023-10-12 15:44:12 +07:00
ronoaer
d1f66cbf4d updated translations for branch feature/amnezia-wireguard-client-impl 2023-10-12 16:26:37 +08:00
vladimir.kuznetsov
a4624c7377 removed the close button for the app for mobile platforms 2023-10-12 10:57:13 +05:00
pokamest
10435cea69 Tiny refactoring and text fixes 2023-10-12 01:15:05 +01:00
pokamest
ce9a23e021 Merge branch 'dev' into feature/amnezia-wireguard-client-impl 2023-10-11 19:40:40 +01:00
pokamest
4b7c8f21c2 Merge pull request #364 from amnezia-vpn/bigfix/reset_topbutton_xposition
updated x position of topbutton  when resize window
2023-10-11 11:37:17 -07:00
pokamest
6ddebdbbd1 Merge pull request #365 from amnezia-vpn/bugfix/container-config-on-connect
fixed container config synchronization
2023-10-11 11:36:39 -07:00
pokamest
d92729d346 Fix install_docker.sh 2023-10-11 15:30:55 +01:00
Mykola Baibuz
fa06dbbd29 Bump Android verion 2023-10-10 08:52:36 -04:00
vladimir.kuznetsov
5d59a1a10e fixed an error when after the first connection with admin config the container model was not updated 2023-10-10 12:18:56 +03:00
vladimir.kuznetsov
222a251180 Merge branch 'feature/amnezia-wireguard-client-impl' of github.com:amnezia-vpn/amnezia-client into feature/amnezia-wireguard-client-impl 2023-10-10 14:16:02 +05:00
vladimir.kuznetsov
9d6559f0d7 fixed an error when after the first connection with admin config the container model was not updated 2023-10-10 12:50:41 +05:00
ronoaer
da02f49850 update x value of topbutton when resize window 2023-10-10 08:43:56 +08:00
Mykola Baibuz
992961c488 Update Windows WG to AWG protocol support 2023-10-09 16:32:43 -04:00
vladimir.kuznetsov
0ce30a4e81 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/amnezia-wireguard-client-impl 2023-10-09 23:19:48 +05:00
vladimir.kuznetsov
bb2d794b6f corrections to the text 2023-10-09 23:18:24 +05:00
Nethius
45dc302de4 Merge pull request #362 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
Bugfix/minor UI fixes 4 version
2023-10-10 01:12:57 +07:00
vladimir.kuznetsov
4a2706a9d9 increased the application version to 4.0.8.1 2023-10-09 23:00:53 +05:00
vladimir.kuznetsov
00be3c3ccc corrections to the text 2023-10-09 22:54:33 +05:00
vladimir.kuznetsov
cb7fe50d46 added margins for picture with qr code 2023-10-09 22:40:06 +05:00
vladimir.kuznetsov
d364dbac2c now when a new container is installed, it is selected as the default container 2023-10-09 22:39:32 +05:00
vladimir.kuznetsov
042788bec3 moved add new server button to main tabbar 2023-10-09 20:19:22 +05:00
Mykola Baibuz
def261f578 Merge branch 'dev' into feature/amnezia-wireguard-client-impl 2023-10-09 11:00:37 -04:00
Mykola Baibuz
c08e23085e Fix protocol change from AWG to WG for Android 2023-10-09 10:29:42 -04:00
vladimir.kuznetsov
e01dd2bf57 added close application button in settings page 2023-10-09 19:16:06 +05:00
pokamest
61396ec82e Merge pull request #361 from amnezia-vpn/fix/android-accessibility
Disable android accessibility
2023-10-08 12:43:05 -07:00
albexk
357c283437 Disable android accessibility 2023-10-08 20:08:32 +03:00
Nethius
1b38cd6ca7 Merge pull request #360 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
Bugfix/minor UI fixes 4 version
2023-10-08 23:15:34 +07:00
Mykola Baibuz
bdfa8bfe5b AWG Android support 2023-10-07 09:01:29 -04:00
Mykola Baibuz
7f2ef65fe6 Update WG to AWG for Android 2023-10-06 17:20:41 -04:00
vladimir.kuznetsov
102d0472c7 Merge branch 'feature/amnezia-wireguard-client-impl' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-10-06 22:06:50 +05:00
vladimir.kuznetsov
445fc6efb1 renamed amneziawireguard to awg in ios controller 2023-10-06 22:05:48 +05:00
pokamest
135726f177 Merge branch 'dev' into feature/amnezia-wireguard-client-impl 2023-10-06 14:22:45 +01:00
vladimir.kuznetsov
671ca0a66f renamed amneziawireguard to awg 2023-10-06 17:26:45 +05:00
vladimir.kuznetsov
aa4a79934a renamed amenziawireguard to awg 2023-10-06 17:19:44 +05:00
vladimir.kuznetsov
16fc0617e4 renamed amneziawireguard files to awg 2023-10-06 17:02:28 +05:00
vladimir.kuznetsov
64a2f3f8bb Merge branch 'feature/amnezia-wireguard-client-impl' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-10-06 16:44:58 +05:00
vladimir.kuznetsov
b7a65343af added the ability to change awg parameters on the protocol settings page 2023-10-06 16:43:52 +05:00
Nethius
5c121ea48d Merge pull request #353 from amnezia-vpn/feature/added_i18n_for_v4
added i18n for v4
2023-10-06 11:49:17 +03:00
ronoaer
673f28ed64 retanslate donation way 2023-10-06 16:32:04 +08:00
ronoaer
3fb97d16bb updated about page 2023-10-06 15:49:48 +08:00
ronoaer
079c9176ef fixed minor issues of translation 2023-10-06 15:29:15 +08:00
ronoaer
9377a0b545 updated translated-text to connectStatusText in ConnectionController 2023-10-06 14:37:10 +08:00
ronoaer
1357c4a309 applied translation-funcation to SystemTray 2023-10-06 13:43:32 +08:00
Mykola Baibuz
d77be5a244 Update iOS network extension 2023-10-06 00:38:54 +03:00
Mykola Baibuz
08863edb52 Update AWG iOS binary again 2023-10-05 17:11:40 -04:00
Mykola Baibuz
3a77705142 Update AWG binary 2023-10-05 15:55:32 -04:00
ronoaer
1eafa9a38a updated about and tor 2023-10-05 23:47:50 +08:00
vladimir.kuznetsov
396b7aac18 fixed display of amnezia dns description on main menu 2023-10-05 13:56:00 +05:00
ronoaer
08defbbbd8 updated original string format, for adapting multi-language 2023-10-05 13:26:11 +08:00
ronoaer
79d371fb76 translated pages from english to chinese 2023-10-05 00:54:49 +08:00
vladimir.kuznetsov
9df262d502 fixed sending parameters to the awg daemon for windows 2023-10-04 19:14:27 +03:00
pokamest
6f392ce126 Crash on exit fix for Windows 2023-10-04 16:09:03 +01:00
vladimir.kuznetsov
a83ec10b61 updated description for full access sharing 2023-10-04 14:47:49 +05:00
vladimir.kuznetsov
a93f75fb5a added full version to page about 2023-10-04 14:40:17 +05:00
ronoaer
2353cc4f2c translated sub-page of Settings to Chinese 2023-10-04 15:48:35 +08:00
ronoaer
30709c66ef translated settings page 2023-10-04 09:05:29 +08:00
Nethius
70e6a3d303 Merge pull request #359 from amnezia-vpn/bugfix/minor-ui-fixes-4-version
minor ui fixes
2023-10-03 21:48:30 +03:00
Nethius
cc89939d05 Merge pull request #356 from amnezia-vpn/bugfix/buton_set_up_later_visible_logic
updated visible logic of button 'set up later'
2023-10-03 21:29:23 +03:00
vladimir.kuznetsov
7d4a01c757 minor ui fixes 2023-10-03 23:28:44 +05:00
vladimir.kuznetsov
e2d61cb518 renamed functions and variables 2023-10-03 22:38:17 +05:00
Nethius
fb1a9c9867 Merge pull request #357 from amnezia-vpn/feature/allow-android-screenshots
Added switcher "Allow app screenshots" for android
2023-10-03 20:24:10 +03:00
vladimir.kuznetsov
776ae04cbe Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-10-03 22:23:24 +05:00
Nethius
2447ab4305 Merge pull request #352 from amnezia-vpn/fix/drawerTypePositioning
Limit Drawer positioning by dragHeight and total page height
2023-10-03 19:37:58 +03:00
vladimir.kuznetsov
52124b15e8 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into fix/drawerTypePositioning 2023-10-03 19:00:58 +05:00
vladimir.kuznetsov
b1e9e8677b Merge branch 'fix/drawerTypePositioning' of github.com:amnezia-vpn/amnezia-client into fix/drawerTypePositioning 2023-10-03 18:53:16 +05:00
vladimir.kuznetsov
617e772cc1 added transitions and open/close by clicking on an item for the center menu button 2023-10-03 18:49:54 +05:00
ronoaer
27f770604b tried to translate some pages, from English to Chinese 2023-10-03 15:59:53 +08:00
Matthew Schwiebert
5bfc581ad2 add documentation, remove uneeded changes of drawertype 2023-10-02 15:40:25 -04:00
vladimir.kuznetsov
2664a52007 removed the dropdown with protocols on the share full access page 2023-10-02 22:04:18 +05:00
vladimir.kuznetsov
6dbbf1fc89 added parsing parameters for windows 2023-10-02 18:48:11 +03:00
vladimir.kuznetsov
c254f2fdc4 Merge branch 'feature/amnezia-wireguard-client-impl' of github.com:amnezia-vpn/desktop-client into feature/amnezia-wireguard-client-impl 2023-10-02 18:21:00 +03:00
vladimir.kuznetsov
cf450fa4e4 Merge remote-tracking branch 'origin/feature/amnezia-wireguard-client-impl' into HEAD 2023-10-02 20:04:40 +05:00
vladimir.kuznetsov
304f29bfac returned 'address' to awg server config and set it to 10.8.1.1/24 2023-10-02 20:03:01 +05:00
vladimir.kuznetsov
50b8b3d649 added parsing of wireguard config parameters when importing native configs 2023-10-02 18:30:32 +05:00
vladimir.kuznetsov
4e6c1094f3 minor ui fixes 2023-10-02 16:31:50 +05:00
Matthew Schwiebert
a6134ca10f fix visibility bug of collapsed state 2023-10-01 20:43:39 -04:00
Matthew Schwiebert
3d999a503c Add custom drawer behavior to pageHome, for mobile and desktop 2023-10-01 20:35:05 -04:00
vladimir.kuznetsov
39c2124a26 returned the awg setting via wg-quick 2023-10-01 21:43:30 +05:00
vladimir.kuznetsov
4e3955b39d Added switcher "Allow app screenshots" for android 2023-10-01 12:15:41 +03:00
ronoaer
784ae0da53 updated visible logic of button 'set up later' 2023-10-01 12:11:13 +08:00
ronoaer
eaede032b4 1. updated memory text when language changed,
2. updated initialize index
2023-10-01 11:12:27 +08:00
Mykola Baibuz
4ed153373f Fix Linux build, some naming changes 2023-09-30 16:05:23 -04:00
ronoaer
07d7fac490 removed invalid code 2023-09-30 17:40:26 +08:00
ronoaer
5535b6a6e3 embedded qm files into qrc file 2023-09-30 17:36:06 +08:00
Mykola Baibuz
b7fbb84a58 iOS AWG protocol Setup 2023-09-30 00:58:08 +03:00
vladimir.kuznetsov
19bd94ed02 Merge branch 'feature/amnezia-wireguard-client-impl' of github.com:amnezia-vpn/amnezia-client into feature/amnezia-wireguard-client-impl 2023-09-29 18:42:45 +05:00
vladimir.kuznetsov
54b45a36e1 test configuration using wg instead of wg-quick to configure the server 2023-09-29 18:41:00 +05:00
Nethius
ed1afa7549 Merge pull request #348 from amnezia-vpn/bugfix/changed_textfield_border_hover_color
added border hover effect for textarea
2023-09-29 16:24:28 +03:00
Mykola Baibuz
2986a18c8f iOS AWG support 2023-09-28 23:54:32 +03:00
Nethius
b2072c06b7 Merge pull request #355 from amnezia-vpn/fixbug/not_hide_topright_corner_button
Fixbug/not hide topright corner button
2023-09-28 23:39:22 +03:00
Nethius
762018883f Merge pull request #347 from amnezia-vpn/bigfix/no_container_redirecteto_wizardeasy
redirected to pagesetupwizardeasy when none containers installed
2023-09-28 21:01:55 +03:00
Nethius
0322c01c0e Merge pull request #340 from amnezia-vpn/bugfix/add_hover_in_home_page
added  hover effect for default-server in pagehome
2023-09-28 20:55:57 +03:00
Nethius
16ccfb8714 Merge pull request #349 from amnezia-vpn/bugfix/changed_cursorshape_for_cardtype
updated cursorshape of cardtype to Qt.PointingHandCursor
2023-09-28 20:55:03 +03:00
ronoaer
68095700a2 added i18n for v4 2023-09-28 23:21:13 +08:00
Matthew Schwiebert
058f8b544e Limit Drawer positioning by dragHeight and total page height 2023-09-28 10:14:01 -04:00
vladimir.kuznetsov
4cb871849b Merge remote-tracking branch 'remotes/origin/dev' into feature/amnezia-wireguard-client-impl 2023-09-28 00:26:26 +03:00
vladimir.kuznetsov
423305c35a moved the configuration of new parameters for awg to addInterface() 2023-09-28 02:14:07 +05:00
vladimir.kuznetsov
b55313527e added passing new amneziawireguard config parameters over uapi for all platforms 2023-09-27 00:45:42 +05:00
vladimir.kuznetsov
af53c456ea added passing new wireguard config parameters over uapi and configuring the amneziawireguard container 2023-09-27 00:40:01 +05:00
ronoaer
37024eb91d updated cursorshape of cardtype to Qt.PointingHandCursor 2023-09-26 17:23:35 +08:00
ronoaer
ee99565b63 1. added border-hover-interaction
2. updated textarea-focus-interaction
2023-09-26 16:38:08 +08:00
pokamest
1a8c08799f Merge pull request #346 from amnezia-vpn/bugfix/win-build
Windows. Remove unused binary from build files
2023-09-25 09:48:15 -07:00
ronoaer
8b08a5bee0 added border hover effect for textarea 2023-09-25 22:16:59 +08:00
ronoaer
51497d87e0 redirected to pagesetupwizardeasy when none containers installed 2023-09-25 07:22:11 +08:00
Mykola Baibuz
7ede1a8d83 Remove unused binary from build files 2023-09-24 22:09:30 +03:00
Mykola Baibuz
b4df5c076e Fix Linux App startup icon (#344)
* Fix Linux App startup icon
* Use project version from cmake
* Set Release date automatically
2023-09-24 16:57:59 +01:00
Mykola Baibuz
52400252dd Fix disconnect button for desktop WG (#345)
* Fix disconnect button for desktop WG
2023-09-24 12:06:52 +01:00
ronoaer
49923c4214 renamed deaultservertype, and moved to components 2023-09-24 08:21:27 +08:00
ronoaer
81b77c9688 Merge branch 'feature/new-gui' into fixbug/not_hide_topright_corner_button 2023-09-22 06:28:02 +08:00
vladimir.kuznetsov
7284bb54bc Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/amnezia-wireguard-client-impl 2023-09-22 00:39:32 +05:00
vladimir.kuznetsov
6afdd8375d added models, classes and ui files for amnezia wireguard 2023-09-22 00:37:55 +05:00
pokamest
af23d9fd14 Merge pull request #209 from amnezia-vpn/feature/new-gui
feature/new-gui
2023-09-21 12:07:22 -07:00
pokamest
e7aead292c Merge pull request #341 from amnezia-vpn/feature/icons-android-round
Android round icons
2023-09-21 11:53:09 -07:00
Mykola Baibuz
fd2678ce2f Android round icons
Icons for some older Android phones that use round icons.
2023-09-21 14:45:46 -04:00
Nethius
a6d660e708 Merge pull request #336 from amnezia-vpn/bugfix/close_drawer_easily
Bugfix/close drawer easily, short distance with dragging
2023-09-21 20:18:43 +05:00
ronoaer
de35a26285 added hover effect for default-server in pagehome 2023-09-21 23:03:12 +08:00
vladimir.kuznetsov
18bb045e9a Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-09-21 19:41:41 +05:00
pokamest
9090ec54e7 Merge pull request #339 from amnezia-vpn/dev
Release 3.1.0.1
2023-09-21 07:28:08 -07:00
pokamest
6fa9994366 Merge pull request #335 from amnezia-vpn/feature/linux-wg-rework
WireGuard rework for Linux
2023-09-21 05:43:10 -07:00
pokamest
665f2412f1 Version bump, macos/ios build fix [no ci] 2023-09-21 05:14:15 -07:00
pokamest
395099aa40 Merge pull request #338 from amnezia-vpn/bugfix/windows_signing_fix
build_windows.bat fix
2023-09-21 04:13:04 -07:00
pokamest
97a72a9ee2 build_windows.bat fix 2023-09-21 11:28:18 +01:00
pokamest
3414202b7b Merge pull request #332 from amnezia-vpn/bugfix/wireguard-config-import
added parsing of wireguard config parameters when importing native configs
2023-09-21 03:23:41 -07:00
Mykola Baibuz
52e5453d56 Upload AWG binary 2023-09-20 14:27:28 -04:00
ronoaer
dd039a612f used position-changed to closes drawer 2023-09-20 14:18:21 +08:00
Mykola Baibuz
f5ab034aeb WG routing rework for Linux 2023-09-19 17:59:04 -04:00
ronoaer
893ec2d61c researching: tried to close drawer easily 2023-09-20 00:18:10 +08:00
vladimir.kuznetsov
ff41b26e94 added parsing of wireguard config parameters when importing native configs 2023-09-19 18:45:06 +05:00
vladimir.kuznetsov
d4d6fbab88 changed the protocols for easySetup setup 2023-09-18 21:06:10 +05:00
vladimir.kuznetsov
e38fe871b2 Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-09-18 20:24:15 +05:00
vladimir.kuznetsov
152d7bc3b3 added restore default settings for dns settings page 2023-09-18 17:52:41 +05:00
vladimir.kuznetsov
9e7cf3ccd9 added PageServiceDnsSettings 2023-09-18 16:39:26 +05:00
ronoaer
f7370a0280 fixed: topright-corner button not visible when drawer closed 2023-09-18 14:35:22 +08:00
Nethius
814c574f26 Merge pull request #328 from amnezia-vpn/bugfix/add_top_close_button
added close button when drawer shown in the topright corner
2023-09-18 10:48:13 +05:00
Nethius
fd9f9ee178 Merge pull request #320 from amnezia-vpn/bugfix/scroll_stuck_on_fl_textarea
fixed scroll stuck on textarea in page OpenVpnSettings
2023-09-18 10:47:58 +05:00
ronoaer
29e8f8f5fb Merge branch 'feature/new-gui' into bugfix/scroll_stuck_on_fl_textarea 2023-09-18 07:36:01 +08:00
Mykola Baibuz
279692afea WireGuard rework for Linux 2023-09-17 17:06:24 -04:00
vladimir.kuznetsov
fd09321f8e removed the 'mount sftp folder' button for mobile platforms 2023-09-18 00:16:58 +05:00
vladimir.kuznetsov
ad236baa86 fixed a typo in the variable name 2023-09-17 23:24:21 +05:00
vladimir.kuznetsov
8965b1fbba fixed the size of the drawer close button 2023-09-17 23:21:00 +05:00
vladimir.kuznetsov
9b32411659 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-09-17 17:07:28 +05:00
Nethius
32dda9b904 Merge pull request #325 from amnezia-vpn/bugfix/reconnectvpn_when_dc_changed
auto reconection when current-server's defaul container hase been cha…
2023-09-17 17:06:02 +05:00
vladimir.kuznetsov
c0cb5b96bf added reconnection to vpn after changing any protocol settings 2023-09-17 17:03:39 +05:00
Nethius
ff60030ffb Merge pull request #329 from amnezia-vpn/bugfix/text_not_saved_after_edited
fixed additional info can not be save in page OpenVpn settings
2023-09-17 15:17:28 +05:00
vladimir.kuznetsov
f40bf2d9ba limited the length of the displayed server name
- added auto-selection of the first available protocol when changing the server on the PageShare page
2023-09-17 15:01:31 +05:00
ronoaer
9eebee3ce3 fixed additional info can not be save in page OpenVpn settings 2023-09-16 16:20:19 +08:00
ronoaer
8a3bdf136b added close button when drawer shown in the topright corner 2023-09-16 08:05:43 +08:00
Mykola Baibuz
f62076d3fd Android 8 support (#321) 2023-09-15 19:42:04 +01:00
pokamest
92f4d6b392 Merge pull request #327 from amnezia-vpn/feature/android-icon
Update Android icons
2023-09-14 23:39:10 +01:00
Mykola Baibuz
96ffd7e147 Update Android icons 2023-09-14 23:44:57 +03:00
Mykola Baibuz
07c38e9b6c WireGuard rework for MacOS and Windows (#314)
WireGuard rework for MacOS and Windows
2023-09-14 17:44:17 +01:00
vladimir.kuznetsov
c0aca97083 Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into HEAD 2023-09-14 21:26:13 +05:00
vladimir.kuznetsov
2fd25f53cc fixed auto-connection starting after starting the application 2023-09-14 15:35:24 +05:00
vladimir.kuznetsov
2b3383a163 removed the transition animation between tabs in the main menu
- fixed Drawer freezing when importing files from outside the application
2023-09-14 15:21:35 +05:00
pokamest
421a27ceae Merge pull request #326 from amnezia-vpn/feature/issue-template
Update issue templates
2023-09-13 17:24:32 -07:00
pokamest
10022451b4 Update issue templates 2023-09-14 01:20:38 +01:00
Nethius
3c8d923299 Merge pull request #322 from amnezia-vpn/bugfix/reconnect_server_when_changevp
reconnect to server when changed the protocol and status is connected…
2023-09-13 20:48:37 +05:00
Nethius
154044e32a Merge pull request #323 from amnezia-vpn/bugfix/linktext_cursor_sftp
the cursor changes to Qt.PointingHandCursor when hovering over links
2023-09-13 20:47:21 +05:00
ronoaer
bfc8c10f3d auto reconection when current-server's defaul container hase been changed 2023-09-13 20:49:44 +08:00
vladimir.kuznetsov
d93b5a7b5c fixed saving of configs for mobile platforms 2023-09-13 16:34:03 +05:00
vladimir.kuznetsov
4ae608ed93 added import backup file from outside for ios 2023-09-13 16:11:08 +05:00
vladimir.kuznetsov
e2aef1fc1d fixed display of installation errors on the initial installation screen 2023-09-13 11:09:29 +05:00
ronoaer
16cadfeae8 the cursor changes to Qt.PointingHandCursor when hovering over links 2023-09-13 09:39:17 +08:00
ronoaer
3c9b42b9f7 deleted unused code 2023-09-13 08:44:50 +08:00
ronoaer
9c0f27edb4 removed invalid codes 2023-09-13 08:01:14 +08:00
ronoaer
f81ee1b267 reconnect to server when changed the protocol and status is connected or connnecting 2023-09-12 21:38:36 +08:00
ronoaer
a964d955f4 fixed scroll stuck on textarea in page OpenVpnSettings 2023-09-11 23:49:50 +08:00
Nethius
f11c65c393 Merge pull request #319 from amnezia-vpn/fix_install_error_in_procotolpage
fixed the implicitWidth error in protocol installation page
2023-09-11 16:49:46 +05:00
vladimir.kuznetsov
f8e5e9f675 fixed display of cursorShape for all mouseArea 2023-09-11 16:48:56 +05:00
ronoaer
72eb36f5b3 fixed the implicitWidth error in protocol installation page 2023-09-11 18:55:50 +08:00
vladimir.kuznetsov
97c0fe1ece increased the application version to 4.0.5.1 2023-09-11 14:55:52 +05:00
vladimir.kuznetsov
844b552bf3 removed duplicate function routeMode 2023-09-11 14:45:10 +05:00
vladimir.kuznetsov
6bb85deca6 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-09-11 14:03:14 +05:00
vladimir.kuznetsov
551f7616f0 fixed the display of the protocol list in the settings when attempting to install a container that is already installed on the server 2023-09-11 13:56:49 +05:00
pokamest
285c508329 VPN mode fixes for Android and iOS 2023-09-10 17:40:18 -07:00
vladimir.kuznetsov
f751657903 fixed false triggering of swipes for the main menu drawer of PageHome 2023-09-09 22:41:36 +05:00
vladimir.kuznetsov
89096554e8 added constructor for MobileUtils.cpp 2023-09-09 18:31:04 +05:00
vladimir.kuznetsov
4bf6cce4ba fixed return type of sharedText function 2023-09-09 18:25:44 +05:00
vladimir.kuznetsov
85eae0b74a Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-09-09 15:01:03 +05:00
vladimir.kuznetsov
0a5657738e added a wait for the file dialog to close when sharing ios files 2023-09-09 15:00:34 +05:00
ronoaer
3aa0adbf39 fixed conflicts 2023-09-09 08:52:16 +08:00
Nethius
7dc21ce8a7 Merge pull request #317 from amnezia-vpn/adapt_mac_installer_wizard
adapted installer wizard to macos style
2023-09-09 01:30:45 +05:00
Nethius
6a6b200861 Merge pull request #316 from amnezia-vpn/fixed_protocol_reload_old_value
fixed: protocol reloads old value in settings page
2023-09-09 01:30:21 +05:00
vladimir.kuznetsov
1c7868312d added getting the path to the file for iOS 2023-09-09 01:29:28 +05:00
pokamest
90d1c16783 Merge pull request #315 from amnezia-vpn/installer_adapt_macos_wrap_text
updated installer-wizardstyle for adapting macos, especially text doe…
2023-09-08 12:29:31 -07:00
ronoaer
3cfca046ba adapted installer wizard to macos style 2023-09-08 21:40:55 +08:00
ronoaer
85414eb65f fixed protocol reloads old value in settings page 2023-09-08 21:31:47 +08:00
vladimir.kuznetsov
fdff57da7c fixed navigation during initial installation 2023-09-08 18:05:08 +05:00
ronoaer
7c223feef5 updated installer-wizardstyle for adapting macos, especially text does not wrapped in the page 'ready for install' 2023-09-08 16:05:24 +08:00
pokamest
3740cb2c30 Remove unnecessary qDebug() [no ci] 2023-09-07 10:56:26 -07:00
vladimir.kuznetsov
b5dd48ad7b reworking of getting the path to the file when saving/opening files 2023-09-07 22:45:01 +05:00
pokamest
e46025739a Merge pull request #312 from amnezia-vpn/dev-fixbug-cloak-protocol-config
fixed: text field can not be updated to memory, including site and port
2023-09-07 04:50:06 -07:00
ronoaer
66a3538d05 fixed: text field can not be updated to memory, including site and port 2023-09-07 07:44:51 +08:00
vladimir.kuznetsov
e1fa24c251 moved the qml filedialog opening code below the ios section 2023-09-06 22:26:37 +05:00
vladimir.kuznetsov
a76e22c021 Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-09-06 22:22:01 +05:00
vladimir.kuznetsov
c166327835 filedialog for qml moved to main.qml 2023-09-06 22:20:59 +05:00
vladimir.kuznetsov
4ab006f065 added swipe up for menu on PageHome 2023-09-06 13:37:37 +05:00
Mykola Baibuz
7eaaef6e75 Connection button status change for background start 2023-09-03 23:18:08 +03:00
Mykola Baibuz
c4f94efe24 Android fileSave fixes 2023-09-02 17:04:35 -04:00
pokamest
2eb729d712 Merge pull request #311 from amnezia-vpn/bugfix/crash_on_exit_fix
Crash on exit fix
2023-09-02 12:38:31 -07:00
pokamest
0343b6cf98 Crash on exit fix 2023-09-02 19:48:43 +01:00
vladimir.kuznetsov
7fc4ea0c68 Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-09-01 20:21:33 +05:00
Mykola Baibuz
195a3ab170 Save files for iOS 2023-09-01 17:29:48 +03:00
vladimir.kuznetsov
a96f485e3c added display of all protocols in the settings after installing a new container
- set the app's max height and width to 600/800
- expanded the description when removing containers
2023-09-01 17:39:23 +05:00
Mykola Baibuz
1b3a32f83f Import config from filesystem on iOS 2023-09-01 14:49:10 +03:00
Mykola Baibuz
cacf74af3c Fix iOS build 2023-09-01 01:08:44 +03:00
vladimir.kuznetsov
4e9f68acff returned the lost comma 2023-09-01 02:07:52 +05:00
vladimir.kuznetsov
b58295d1d6 added the ability to restore settings from backup on the initial screen
- fixed the display of services in the settings for mobile devices
2023-09-01 00:48:58 +05:00
vladimir.kuznetsov
cbcf187814 added missing include files 2023-08-31 21:49:36 +05:00
vladimir.kuznetsov
4baa003c0d removed old ui files 2023-08-31 16:00:41 +05:00
vladimir.kuznetsov
8cf8c3c122 Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-31 15:45:29 +05:00
vladimir.kuznetsov
e3e2c0ab6a Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-31 15:44:08 +05:00
vladimir.kuznetsov
e8862a3811 removed the use of QFileDialog 2023-08-31 15:42:59 +05:00
Mykola Baibuz
1c1a82696b Fix qrDecoder for Android 2023-08-30 17:23:55 -04:00
pokamest
a2893bac7e Fixes for sudo error "host not found" 2023-08-30 20:39:14 +01:00
Mykola Baibuz
0eda42f29f Savefile for iOS 2023-08-30 01:17:14 +03:00
pokamest
26f7310707 3.1.0 Release 2023-08-29 00:05:13 +01:00
pokamest
810da0db61 Fixes for iOS 2023-08-28 14:14:10 -07:00
vladimir.kuznetsov
8f6aa950cd fixed conflicts after merge 2023-08-28 22:03:28 +03:00
vladimir.kuznetsov
36a2482165 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-28 14:44:47 +03:00
vladimir.kuznetsov
639c18395b fixed display of notification about successful clearing of cached profiles
- limited the input for the Port field to only numeric values, in the range 1-65535
2023-08-28 14:18:41 +03:00
vladimir.kuznetsov
fe08fd3f0a moved the connect button to the center of the screen 2023-08-28 11:06:58 +03:00
pokamest
0822ee6b96 Merge pull request #301 from amnezia-vpn/bugfix/camera-usage-ios
Fix camera usage on iOS
2023-08-27 16:33:02 -07:00
Mykola Baibuz
96fdb9241a Fix camera usage on iOS 2023-08-27 23:13:22 +03:00
pokamest
0c6d193e0f iOS build fixes 2023-08-27 11:44:51 -07:00
pokamest
ece15c7394 Refactoring/ios (#300)
iOS app refactoring (native part):
- connection bugs fixed
- improved stability 
- logs from network extension
2023-08-27 18:46:41 +01:00
vladimir.kuznetsov
29bef052c7 minor ui fixes 2023-08-26 10:08:50 +03:00
pokamest
3ce1e40b43 Merge pull request #298 from amnezia-vpn/bugfix/android-stop-button
Fix stop button for Android
2023-08-25 14:40:35 -07:00
pokamest
290316e23e Merge pull request #299 from amnezia-vpn/bugfix/macos-installer
Fix MacOS artifact from GH actions
2023-08-25 14:39:35 -07:00
vladimir.kuznetsov
a74736b100 Merge branch 'bugfix/macos-installer' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-25 09:24:45 +05:00
vladimir.kuznetsov
3f7e7f2601 fixed native wireguard config import if there is no port in the Endpoint field 2023-08-25 09:20:42 +05:00
Mykola Baibuz
abefb011a5 Fix MacOS artifact from GH actions 2023-08-24 09:12:06 -04:00
vladimir.kuznetsov
259eff3fea upgraded app version 2023-08-24 16:25:51 +05:00
vladimir.kuznetsov
c271235d16 added confirmation dialog when clearing logs and notification after clearing 2023-08-24 16:22:55 +05:00
vladimir.kuznetsov
7539afa91e Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-24 14:54:22 +05:00
vladimir.kuznetsov
4c79905f5b added autostart and start minimized options
- added disabling split tunneling when selecting the wireguard protocol
- if for macos the application is minimized to tray, then now it is not displayed in the dock
2023-08-24 14:53:52 +05:00
Mykola Baibuz
b6d020e202 Update prebuilt (fix freezed connection after vpn over cloak android) 2023-08-23 21:14:36 -04:00
Mykola Baibuz
5a4dec3dc5 Fix stop button for Android 2023-08-23 17:16:40 -04:00
vladimir.kuznetsov
23ad006187 removed Widgets from service part 2023-08-23 00:20:59 +05:00
vladimir.kuznetsov
f7926847ac minor ui fixes 2023-08-22 14:37:29 +05:00
pokamest
895bd578e4 Merge pull request #292 from amnezia-vpn/feature/ios-wg-prebuilt
WG for iOS prebuilt
2023-08-21 03:14:38 -07:00
Mykola Baibuz
67a052b117 WG for iOS prebuilt 2023-08-20 17:47:16 -04:00
pokamest
3e41dae3ea MacOS 10.15 (Catalina) compatibility 2023-08-20 12:29:07 +01:00
vladimir.kuznetsov
420c616e9d added authResultReceiver to android.cmake 2023-08-20 13:43:27 +05:00
vladimir.kuznetsov
822009ec5f Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-20 13:38:07 +05:00
vladimir.kuznetsov
b5e1c78461 minor ui fixes 2023-08-20 13:36:54 +05:00
pokamest
bd0e892447 Merge pull request #289 from amnezia-vpn/refactoring-android
Refactoring android
2023-08-19 05:41:16 -07:00
albexk
92db453f81 Merge branch 'dev' into refactoring-android
# Conflicts:
#	client/CMakeLists.txt
2023-08-19 14:52:39 +03:00
vladimir.kuznetsov
0060f57b63 fixed selection of connection type on PageShare when changing protocol 2023-08-19 13:12:54 +05:00
albexk
2c517de5bb Move Android part of cmake to a separate file 2023-08-18 22:26:43 +03:00
albexk
9d5f7fdd9c Refactor and improve Android build script and GitHub action 2023-08-18 21:40:48 +03:00
vladimir.kuznetsov
ddaa5b784d minor ui fixes 2023-08-18 14:14:45 +05:00
pokamest
fadd9ff95d Merge pull request #288 from amnezia-vpn/bugfix/openvpn3-stability
Stability fixes in OpenVPN3 lib
2023-08-17 01:56:47 -07:00
vladimir.kuznetsov
a40f365a54 "added display of busy server package manager on the PageSetupWizardInstalling" 2023-08-16 23:48:25 +05:00
vladimir.kuznetsov
3964bffce4 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-16 23:47:21 +05:00
vladimir.kuznetsov
a8deb3593b dropdown list fixes to match design layout 2023-08-16 22:45:05 +05:00
pokamest
ba3ef98d1e Fix for server busy check (#287)
Fix for server busy check
2023-08-16 16:08:08 +01:00
Mykola Baibuz
59de0d47a3 Stability fixes in OpenVPN3 lib 2023-08-16 08:08:52 -04:00
vladimir.kuznetsov
e0d6e0117e Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-16 13:26:41 +05:00
vladimir.kuznetsov
e157160337 added disconnection from vpn when closing application for desktop
- many small ui fixes
2023-08-16 12:11:34 +05:00
pokamest
c7d2a3ffd4 Release 3.0.9 2023-08-13 15:22:24 +01:00
pokamest
2f897c9c98 Merge pull request #284 from amnezia-vpn/bugfix/sshclient_fix
Fix issue with SSH keys support
2023-08-13 03:51:58 -07:00
pokamest
de83db10d6 sshclient.cpp fix 2023-08-13 11:13:22 +01:00
pokamest
4c690dd3c6 Install scripts fixes (#275)
* Install scripts fixes
2023-08-13 11:10:41 +01:00
vladimir.kuznetsov
14fa0b4fd3 added qr code scanner for ios 2023-08-13 11:28:32 +05:00
pokamest
f8b55eb017 Merge pull request #283 from amnezia-vpn/feature/android-cmake-ss
Move SS libs from gradle to cmake
2023-08-12 04:06:15 -07:00
Mykola Baibuz
2b0bccf2d8 Move SS libs from gradle to cmake 2023-08-12 13:44:10 +03:00
vladimir.kuznetsov
c1c68cf72d fixed ability to share warguard in native format 2023-08-10 10:02:13 +05:00
pokamest
3db5c49009 Merge pull request #279 from amnezia-vpn/bugfix/android-qtcreator-build
Remove symlinks for android libs
2023-08-09 15:40:59 -07:00
Mykola Baibuz
87ffaceca3 Remove symlinks for android libs 2023-08-09 18:38:06 -04:00
vladimir.kuznetsov
591d98d8b6 moved vpnConnection to separate thread
- added tabbar blocking when installing/removing containers
2023-08-09 18:17:29 +05:00
vladimir.kuznetsov
e0d93eaa9f Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-09 10:33:34 +05:00
pokamest
5510ff7dce iOS connection fixes (#278)
iOS VPN connection fixes
2023-08-09 03:02:41 +01:00
pokamest
a1a6185fd6 Fixes for split tunneling (#272)
Fixes for split tunneling
2023-08-09 00:41:00 +01:00
pokamest
b71b87e6e9 Merge pull request #277 from amnezia-vpn/bugfix/openvpn-path-linux
Fix path to OpenVPN executable for Linux
2023-08-08 16:09:56 -07:00
Mykola Baibuz
41cc518e20 Fix path to OpenVPN executable
We have service that runs OpenVPN on Linux.  We need to make same
path for client and service.
2023-08-08 18:16:01 -04:00
pokamest
508356898f Fixes for linux (#273)
* Use prebuilt OpenVPN binary for Linux
2023-08-08 16:16:47 +01:00
vladimir.kuznetsov
0c40a954fa fixed include in sitesController for android build 2023-08-08 19:39:08 +05:00
vladimir.kuznetsov
784f99a900 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-08-08 19:12:17 +05:00
vladimir.kuznetsov
90ae0b3e44 added PageSettingsSplitTunneling
- added a call to the context menu when clicking the right mouse button for textInput
2023-08-08 19:10:14 +05:00
pokamest
520aaac31f CMake fixes for OpenSSL (#274)
* CMake fixes for OpenSSL
* Fix missed ldl link
* Some refactor for static libraries linkage
* Change library linkage order (GNU feature)
2023-08-08 14:13:35 +01:00
pokamest
8fe1370a74 Merge pull request #270 from amnezia-vpn/feature/macos-wg-prebuilt
Use prebuilt wireguard-go submodule
2023-08-07 11:55:49 -07:00
pokamest
c6ae89bf27 Merge pull request #269 from amnezia-vpn/bugfix/ios-openvpn-cloak-crash
Update OpenVPNAdapter to prevent crash OpenVPN-over-Cloak
2023-08-07 09:20:11 -07:00
Mykola Baibuz
822ef8829e Remove unused wireguard-go submodule 2023-08-06 16:24:39 -04:00
Mykola Baibuz
726e67ebb0 Use prebuilt binary for MacOS WireGuard 2023-08-06 16:21:01 -04:00
Mykola Baibuz
d4825b1d40 Update OpenVPNAdapter to prevent crash OpenVPN-over-Cloak 2023-08-05 14:56:42 -04:00
Mykola Baibuz
f58a16ca9d Prebuilt binaries for third-party submodules (#252)
* Add prebuilt submodule
* Remove Android native library
* Add links for Android prebuilt library
* Update OpenSSL to prebuilt binaries
* Setup links for prebuilt OpenSSL
* Set correct OpenSSL header dir
* Update prebuilt submodule
* Use static OpenSSL for linux build
* Use prebuilt binary from 3rd-prebuilt for Win installer
* Use prebuilt binary from 3rd-prebuilt for Linux installer
* Use prebuilt binary from 3rd-prebuilt for MacOS installer
* Use Android prebuilt openvpn libs
* Cleanup some unneeded code
* Add new maven repo for gradle-versions-plugin
* Use jitpack version of jsocks
* Fix some unnecessary header copy
* Fix issue with package name of original WG libs
* Change submodule path to https (3rd-prebuilt)
* Fix windows installer
* MacOS deploy fixes
* NetworkChange detection for OpenVPN protocol (#256)
* NetworkChange detection for OpenVPN protocol
* Update android native libs
* Always on VPN mode for OpenVPN, Cloak+OpenVPN
* Set foregroundService type
* Android 14 require to set foregroundServiceType
* Remove unused code and cleanup submodules
* Cleanup gradle build script
* Fix start button status
* Pull OpenSSL prebuilt for MacOS, iOS
* Update links for OpenSSL MacOS, iOS prebuilt
* Update OpenSSL binaries path
* Refactor some OpenSSL includes
* Update MacOS OpenVPN binary with statically linked dependency
* Use prebilt for LibSSH
* Android resources cleanup
* Set static runtime linux
* Use shared LibSSH for Android
* Update SS Android lib name
* Fix Linux install path and file permissions
* Feature/iOS GitHub actions (#265)
* Move Android cpp code to openvpn-pt-android repo
* Remove unused OpenVPN2 Android Libs
* Cleanup Gemfile

---------

Co-authored-by: Mazay B <pokamest@gmail.com>
2023-08-04 18:35:43 +01:00
vladimir.kuznetsov
2c429fd406 added removal of spaces when inserting ip addresses
- fixed server sharing when sharing a server available only for connection when choosing a server with full access
- removed the notification about an empty backup file when the user closes the file dialog without selecting anything
2023-08-02 21:46:02 +09:00
vladimir.kuznetsov
ebcca0c3b8 added processing of private ssh keys 2023-08-02 20:37:43 +09:00
vladimir.kuznetsov
925fd9f268 added display of installed services on the page PageSettingsServersList 2023-08-01 11:06:46 +09:00
vladimir.kuznetsov
0058edc24e added server availability check after entering credentials
- moved the protocol self-selection button to the PageSetupWizardEasy page
2023-07-31 20:38:13 +09:00
vladimir.kuznetsov
aa66133813 added 'insert' button and 'show password' button for PageSetupWizardCredentials 2023-07-31 14:29:49 +09:00
vladimir.kuznetsov
66f9a82f31 added icons for buttons in the drop-down window of connections sharing.
- corrections in texts
2023-07-31 12:54:59 +09:00
vladimir.kuznetsov
1092abe776 added output of notifications/errors after installation/import 2023-07-31 00:13:08 +09:00
vladimir.kuznetsov
0411792ca5 added qr-code decoder for android
- added color change for status and navigation bar for android
2023-07-25 16:56:10 +09:00
vladimir.kuznetsov
b9a13d3a32 changed all text to english 2023-07-24 16:33:58 +09:00
vladimir.kuznetsov
0a1359ed16 moved the platform-specific android code for the new ui 2023-07-24 16:31:04 +09:00
pokamest
9bd8c774ab Merge pull request #261 from amnezia-vpn/feature/browserstack
BrowserStack info added
2023-07-18 12:32:34 -07:00
pokamest
2943f93218 BrowserStack info added 2023-07-18 20:28:07 +01:00
vladimir.kuznetsov
5b8a0881b7 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-07-18 05:36:17 +03:00
vladimir.kuznetsov
5d677a9115 added pages for sftp and tor website settings 2023-07-18 11:15:04 +09:00
pokamest
26bf9aab26 iOS icons fixed [no ci] 2023-07-17 18:10:24 -07:00
pokamest
d9b4529932 Bugfix/ios icons (#260)
iOS icons updated  [no ci]
2023-07-16 15:41:15 +01:00
pokamest
35ecb8499d WireGuard for MacOS (#248)
* WireGuard for MacOS
* Fix openvpn block-outside-dns
2023-07-15 22:19:48 +01:00
pokamest
ed5dc7cdfd Fix for Cloak on iOS [no ci] 2023-07-15 13:00:55 -07:00
vladimir.kuznetsov
75489c00c2 added button 'Reset settings and remove all data from the application' 2023-07-14 22:59:49 +09:00
vladimir.kuznetsov
3aaa7b62ef added page to display raw config 2023-07-14 13:14:50 +09:00
vladimir.kuznetsov
c13b9754eb added protocol settings pages and models for openvpn, cloak and shadowsocks 2023-07-13 11:29:26 +09:00
vladimir.kuznetsov
a97417fd38 added config export in native format openvpn and wireguard 2023-07-05 10:15:38 +09:00
vladimir.kuznetsov
43261f8469 added busy indicator component
- replaced the image of the connect button with native rendering
2023-07-04 09:58:19 +09:00
vladimir.kuznetsov
b32935dd97 Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-06-30 18:15:13 +03:00
vladimir.kuznetsov
35660ff5e7 speed optimization of ui on windows 2023-06-30 18:14:47 +03:00
vladimir.kuznetsov
9b07909ed8 added FlickableType to PageSettingsServerProtocols and PageSettingsServerServices 2023-06-30 13:45:11 +09:00
vladimir.kuznetsov
b4eb317b00 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-06-30 05:00:20 +03:00
vladimir.kuznetsov
464d77dfb5 added functionality to change app language via settings 2023-06-30 10:40:43 +09:00
pokamest
a67ad12cde Merge pull request #255 from amnezia-vpn/bugfix/build_fixes
Build fixes and some refactoring
2023-06-29 17:58:57 -07:00
pokamest
0dba9b8268 Github actions fixes 2023-06-29 17:38:04 -07:00
Mazay B
4a4c9cd63f Build fixes and some refactoring 2023-06-30 00:21:56 +01:00
vladimir.kuznetsov
d0c9c1043c Merge remote-tracking branch 'remotes/origin/dev' into feature/new-gui 2023-06-27 13:38:06 +03:00
vladimir.kuznetsov
795405c47d added display of amnesia dns container activity on the main page 2023-06-27 19:07:42 +09:00
pokamest
e0c2f873f5 Merge pull request #253 from amnezia-vpn/bugfix/android_textfield
Workaround for bug https://bugreports.qt.io/browse/QTBUG-113461
2023-06-26 16:27:39 -07:00
Mazay B
1ec50cf6ad Workaround for bug https://bugreports.qt.io/browse/QTBUG-113461 2023-06-27 00:23:34 +01:00
vladimir.kuznetsov
2ef53c6df9 added separation for read/write and readonly servers for pageSettingsServerProtocols, PageSettingsServerServices, PageSettingsServerData
- added fields validations for pageSetupWizardCredentials
2023-06-23 15:24:40 +09:00
vladimir.kuznetsov
249be451f7 moved handling of connection states from qml in connectionController
- added a check for already installed containers before installing the server/container
- added a button to scan the server for installed containers
- added separation for read/write and readonly servers for pageHome
2023-06-21 20:56:00 +09:00
pokamest
34a228adbe Added AmneziaVPN svg logo 2023-06-20 18:19:48 +01:00
pokamest
9782eaaeea Update README.md 2023-06-20 17:29:34 +01:00
pokamest
50d3122bee Updated readme 2023-06-20 17:26:55 +01:00
vladimir.kuznetsov
3a264e6baf added a drawer to change the server name and moved the display of the exported config to a separate drawer 2023-06-20 10:25:24 +09:00
Mazay B
1b75b68373 Fix in AndroidController [NO CI] 2023-06-18 17:49:03 +01:00
vladimir.kuznetsov
4224e8314b Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-06-16 13:49:19 +09:00
vladimir.kuznetsov
7b14ad9616 added PageSettingsAbout, PageSettingsApplication, PageSettingsBackup, PageSettingsConnection, PageSettingsDns
- added SettingsController
2023-06-16 13:43:55 +09:00
vladimir.kuznetsov
be7386f0d7 added exportController and PageShare
- added a blank PageSettingsProtocol
2023-06-13 20:03:20 +09:00
vladimir.kuznetsov
cd3263db50 made libssh::ssh_connect a non-blocking feature
- extended error handling when connecting via ssh
2023-06-10 05:25:41 +03:00
vladimir.kuznetsov
3034019d5a Merge branch 'feature/new-gui' of github.com:amnezia-vpn/amnezia-client into feature/new-gui 2023-06-07 18:28:44 +08:00
vladimir.kuznetsov
1fd48a1cf8 added protocol settings page and openvpn settings page 2023-06-07 18:28:32 +08:00
vladimir.kuznetsov
c3f39ad24d added caching of servers and containers in models 2023-06-07 13:17:48 +03:00
vladimir.kuznetsov
68d9394d9f fixed windows build errors after refactoring 2023-06-05 17:49:20 +03:00
vladimir.kuznetsov
80fca589af added ConnectionController error handling 2023-06-05 22:40:35 +08:00
vladimir.kuznetsov
420c33d3ba added PageSetupWizardViewConfig
- added a popup with a question when deleting containers/servers
- added import from code and import error handling
2023-06-05 15:49:10 +08:00
vladimir.kuznetsov
de0cd976de added page transition effects
- added functionality for buttons on PageSettingsServerData page
2023-06-01 11:25:33 +08:00
pokamest
a116774104 Bugfix/macos fixes (#247)
* Icon for macos and tiny fixes
* Macos deploy build fix
2023-05-28 16:24:00 +01:00
vladimir.kuznetsov
1e180489a4 added display of vpn containers and services on the settings page
- added PageSettingsData and implementation of 'remove all containers'  button
2023-05-27 22:46:41 +08:00
vladimir.kuznetsov
e00656d757 added PageSettings and PageSettingsServersList.
- replaced PageLoader with PageType with stackView property.
- added error handling when installing a server/container
2023-05-25 15:40:17 +08:00
pokamest
adcc74ac8e Merge pull request #245 from amnezia-vpn/fix/ui_fixes
Tiny ui fixes
2023-05-24 08:17:40 -07:00
pokamest
3e0085b4a4 PopupWithQuestion.qml fix 2023-05-24 16:12:07 +01:00
pokamest
17fb2a98d6 Fix question when removing server from list 2023-05-24 12:18:40 +01:00
Mykola Baibuz
780efc2477 OpenVPN over Cloak for Android and iOS (#158)
OpenVPN over Cloak for Android and iOS
2023-05-23 23:50:36 +01:00
pokamest
7f02fe4157 Merge pull request #244 from amnezia-vpn/bugfix/ios_import_configs
Import configs for iOS
2023-05-23 08:10:46 -07:00
pokamest
f722576bf2 Merge pull request #241 from amnezia-vpn/bugfix/cloak_for_desktops_fix
Fixes for Cloak proto
2023-05-23 08:00:15 -07:00
pokamest
7fecc2cf4c Merge pull request #242 from i-ky/badge-link
Make build status badge into a link
2023-05-23 07:54:02 -07:00
pokamest
3519e070b4 Merge pull request #243 from i-ky/linguist
Mark client/3rd/ as vendored code
2023-05-23 07:53:17 -07:00
vladimir.kuznetsov
ca6b7fbeb2 added importController 2023-05-22 22:11:20 +08:00
i-ky
25d7e121c9 Mark client/3rd/ as vendored code 2023-05-22 14:21:02 +03:00
i-ky
882077f0aa Make build status badge into a link 2023-05-22 13:30:03 +03:00
vladimir.kuznetsov
0479113949 moved ContainersPageHomeListView and ConnectionTypeSelectionDrawer to separate components 2023-05-22 00:10:51 +08:00
pokamest
b5b69ff369 Fixes for Cloak proto 2023-05-20 18:44:19 +01:00
i-ky
f0ad76fff6 Gitpod integration (#240)
Add Gitpod configuration
2023-05-20 15:55:19 +01:00
amnezia-developer
e651ea7614 Add Qt Multimedia to project (#236)
Add Qt Multimedia to iOS cmake project
2023-05-17 20:38:28 +01:00
vladimir.kuznetsov
acca85b99a added installController with logic for server/container installation 2023-05-17 23:28:27 +08:00
pokamest
230f44f4e6 Import configs for iOS [WIP] 2023-05-15 17:57:35 -07:00
Nethius
19c42490e3 feature/versioning-for-desktop (#181)
Project refactoring and cleanup
2023-05-16 01:34:06 +01:00
vladimir.kuznetsov
03a0e2084a added PageLoader and pageController 2023-05-15 13:38:17 +08:00
vladimir.kuznetsov
116fa6777b added logic to the connect to vpn button 2023-05-14 21:11:19 +08:00
vladimir.kuznetsov
35d4222c7a added connectionController and ConnectionButton.qml 2023-05-12 23:54:31 +08:00
vladimir.kuznetsov
dd0de7e8be Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into origin/feature/new-gui 2023-05-12 11:54:28 +08:00
vladimir.kuznetsov
e3e7503a7c added saving the selected server and protocol to the config 2023-05-12 11:36:09 +08:00
Vladimir Kuznetsov
b66f4bf2be added display of protocols on PageHome 2023-05-11 14:50:50 +08:00
vladimir.kuznetsov
1c8dbae359 added PageHome, PageSettings, PageShare, PageStart
- renamed old PageStart to PageSetupWizardStart
- added various text types
- moved servers model to "global" scope
2023-05-06 06:52:23 +03:00
vladimir.kuznetsov
4f36349630 changed the way to create qml pages, now the page is created when you go to it
- added PageSetupWizardConfigSource, PageSetupWizardInstalling, PageSetupWizardProtocolSettings, PageSetupWizardTextKey
2023-05-03 19:06:16 +03:00
vladimir.kuznetsov
68b27451f2 Added scroll bar for DropDownType 2023-05-01 07:29:09 +03:00
vladimir.kuznetsov
c7acd63ea7 added SwitcherType and TabButtonType
- change CheckBoxType root type
- added PageTest
2023-04-29 19:09:16 +03:00
vladimir.kuznetsov
cfc17cf290 added mousearea to VerticalRadioButton 2023-04-26 18:37:56 +03:00
vladimir.kuznetsov
904e173037 added HorizontalRadioButton and VerticalRadioButton components 2023-04-26 08:30:02 +03:00
Mykola Baibuz
8a8d38a30f Prevent ipv6 leak (#224)
Prevent ipv6 leak for OpenVPN
2023-04-25 16:34:17 +01:00
vladimir.kuznetsov
a9ebf534c6 added DropDown component 2023-04-25 08:04:20 +03:00
pokamest
6429ff0603 Merge pull request #228 from amnezia-vpn/bugfix/openvpn-crl-verify
bugfix/openvpn-crl-verify
2023-04-21 12:43:35 +01:00
vladimir.kuznetsov
f5057dfac4 removed crl-verify from client config
- specified full path to crl in server config
- added crl generation when setting up a container
2023-04-21 07:44:35 +03:00
pokamest
00d61def0b Merge pull request #226 from amnezia-vpn/bugfix/sftp-files-permissions
bugfix/sftp-files-permissions
2023-04-19 16:19:47 +01:00
vladimir.kuznetsov
f5a26c7116 set the value S_IRWXU for windows, so that when copying via sftp, the necessary permissions for the file are set 2023-04-19 17:58:03 +03:00
pokamest
54fba99bed Merge pull request #225 from amnezia-vpn/bugfix/tcp-port-busy-check
in the port busy check, for tcp now only LISTEN ports are checked
2023-04-19 14:09:49 +01:00
vladimir.kuznetsov
7216a8b923 in the port busy check, for tcp now only LISTEN ports are checked 2023-04-19 06:39:50 +03:00
pokamest
97e322ba22 Merge pull request #223 from amnezia-vpn/bugfix/tcp-port-busy-check
in the port busy check, for tcp only the local port is now checked
2023-04-18 18:26:59 +01:00
vladimir.kuznetsov
fc603f11ce in the port busy check, for tcp only the local port is now checked 2023-04-18 20:00:40 +03:00
vladimir.kuznetsov
87f01007cc Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/new-gui 2023-04-18 15:47:11 +03:00
pokamest
10bca290c3 Merge pull request #221 from amnezia-vpn/bugfix/check-sudo-for-root
skipping sudo check for root user
2023-04-18 11:54:29 +01:00
vladimir.kuznetsov
3dabaeb2c9 skipping sudo check for root user 2023-04-18 05:48:37 +03:00
pokamest
cf74b879c6 Merge pull request #219 from amnezia-vpn/change/client-management-update-page
change/client-management-update-page
2023-04-16 14:41:28 +01:00
vladimir.kuznetsov
0ae2a1f177 now, when onUpdateAllPages is called, the ClientInfoLogic and ClientManagementLogic pages will not be updated
- moved the Client Management button to the Advanced Settings page
-
2023-04-16 07:32:32 +03:00
vladimir.kuznetsov
3d63d6c0f2 added PageSetupWizardCredentials and PageSetupWizardProtocols
- fixed hover and pressed effects for controls
2023-04-14 19:31:10 +03:00
vladimir.kuznetsov
905a3a30f3 added some new controls and started layout of pageStart and pageCredentials 2023-04-12 19:13:41 +03:00
pokamest
af29637163 Merge branch 'dev' 2023-04-11 18:00:54 +01:00
Josh Soref
7351fe9633 Spelling (#214)
Spelling fixed
2023-04-11 14:50:44 +01:00
pokamest
1a6b4a1188 Merge pull request #213 from amnezia-vpn/chore/qtssh-gitmodules
removed qtssh from gitmodules
2023-04-11 02:00:34 +01:00
vladimir.kuznetsov
ec96c1b534 added hover and pressed effects for CheckBoxType.qml 2023-04-10 06:43:36 +03:00
vladimir.kuznetsov
8751dd3797 removed qtssh from gitmodules 2023-04-09 05:47:27 +03:00
pokamest
9a6df25280 Merge pull request #149 from amnezia-vpn/feature/qt6-client-management-panel
feature/qt6-client-management-panel
2023-04-08 19:33:09 +01:00
vladimir.kuznetsov
ada8912a1f Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/qt6-client-management-panel 2023-04-08 19:03:10 +03:00
pokamest
de4245025c Merge pull request #189 from amnezia-vpn/feature/check-user-in-sudo
feature/check-user-in-sudo
2023-04-08 16:38:00 +01:00
vladimir.kuznetsov
f620f4a92e Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/check-user-in-sudo 2023-04-08 17:12:23 +03:00
vladimir.kuznetsov
c74c5e0c6d added CheckBoxType
- added hover effect to LabelWithButtonType
2023-04-07 20:50:55 +03:00
pokamest
2ca85c7829 Merge pull request #212 from bakhtiyork/feature/qt6-libssh-support
CI/CD iOS build fix
2023-04-07 17:23:31 +01:00
bakhtiyork
8374404b0f iOS - cmake: disabling testing and programs 2023-04-07 11:21:44 +05:00
pokamest
c453c6c294 Merge pull request #139 from amnezia-vpn/feature/qt6-libssh-support
feature/qt6-libssh-support
2023-04-06 20:09:03 +01:00
pokamest
a5e5c3d941 Merge pull request #210 from amnezia-vpn/dev
Pre-release 3.0.4
2023-04-06 20:05:51 +01:00
pokamest
c242a08653 Merge pull request #193 from bakhtiyork/feature/qt6-libssh-support
iOS - libssh with mbedtls build
2023-04-06 18:04:25 +01:00
bakhtiyork
f931603203 Disabling symbol versioning for iOS 2023-04-06 20:33:12 +05:00
vladimir.kuznetsov
167d57408d added CardType component
- added transition for BasicButtonType
2023-04-06 16:33:53 +03:00
bakhtiyork
ef03a3d9d4 FindMbedTLS.cmake - adding mbedtls targets export 2023-04-06 05:59:42 +05:00
vladimir.kuznetsov
ccfc9f2ad2 added error handling for key authentication 2023-04-05 09:45:03 +03:00
vladimir.kuznetsov
b3456ee96c fixed variable name in addAlreadyInstalledContainersGui() function 2023-04-05 06:20:10 +03:00
vladimir.kuznetsov
05cd4ac14b Merge branch 'feature/qt6-libssh-support' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2023-04-05 06:08:15 +03:00
vladimir.kuznetsov
ba2ecf9789 fixed cleanup of private/public keys after use 2023-04-05 06:07:36 +03:00
pokamest
020e6b1cb3 Merge branch 'dev' into feature/qt6-libssh-support 2023-04-05 03:40:55 +01:00
pokamest
2a7365730b getOpenFileName fix 2023-04-05 03:39:05 +01:00
pokamest
ad77d74f4b Merge branch 'dev' into feature/qt6-libssh-support 2023-04-05 03:26:08 +01:00
pokamest
ef8668dce4 Merge pull request #205 from amnezia-vpn/fix/build_desktop_on_apple_silicon
Fix to build Amnezia desktop app on Apple Silicon
2023-04-05 01:51:31 +01:00
pokamest
3fb34e28a4 Merge pull request #207 from amnezia-vpn/bugfix/add-server-with-same-credentials
bugfix/add-server-with-same-credentials
2023-04-05 01:50:11 +01:00
pokamest
871214f907 Merge pull request #206 from amnezia-vpn/bugfix/server-busy-default-port
bugfix/server-busy-default-port
2023-04-05 01:48:20 +01:00
pokamest
7e717754a3 getOpenFileName fix for Android 2023-04-05 01:43:42 +01:00
vladimir.kuznetsov
6e67946ae2 Removed the ability to add multiple servers with the same connection credentials via the "Add server" button 2023-04-04 19:13:39 +03:00
vladimir.kuznetsov
48d673c853 fixed getting default port and default transport protocol in isServerPortBusy function 2023-04-04 18:20:19 +03:00
Dmitriy Karpushin
a9bb6f8099 Fix to build at least x86_64 version of Amnezia desktop app on Apple Silicon 2023-04-04 17:10:58 +03:00
vladimir.kuznetsov
f8ef69b88a removed setPassphraseCallback() function from ServerController and libssh::Client 2023-04-04 13:32:37 +03:00
vladimir.kuznetsov
a005ed2a84 now an instance of the serverController class is created at the place of use 2023-04-04 10:22:25 +03:00
vladimir.kuznetsov
1aa859b10d moved passphraseCallback and passphraseDialog to startPage
- made some methods of the servercontroller class private
- returned a call to the checkSshConnection() function
2023-04-04 07:09:30 +03:00
vladimir.kuznetsov
4aba34c18b Merge remote-tracking branch 'remotes/origin/dev' into feature/qt6-libssh-support 2023-04-03 17:48:55 +03:00
vladimir.kuznetsov
5e099f522e added private key export without password to client config 2023-04-03 17:27:55 +03:00
pokamest
15c33014e7 Merge pull request #198 from amnezia-vpn/bugfix/qssh-too-many-open-connections
bugfix/qssh-too-many-open-connections
2023-04-02 13:43:30 +01:00
vladimir.kuznetsov
af5b9172ef removed unused disconnectFromHost() from ServerController 2023-04-02 15:19:59 +03:00
bakhtiyork
fe9e813c79 Custom cmake module path 2023-04-02 17:19:21 +05:00
vladimir.kuznetsov
51d7cdfd31 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into bugfix/qssh-too-many-open-connections 2023-04-02 14:48:26 +03:00
vladimir.kuznetsov
f3aef67be6 Added a form for entering a passphrase for a private ssh key and the corresponding logic for processing a private key 2023-04-02 09:09:20 +03:00
pokamest
449af8060a Merge pull request #204 from amnezia-vpn/fix/android_config_import
Android config import
2023-03-29 22:16:16 +01:00
pokamest
fa19f1f5a0 Merge pull request #200 from amnezia-vpn/bugfix/empty-server-list-settings-availability
bugfix/empty-server-list-settings-availability
2023-03-29 15:17:25 +02:00
Dmitriy Karpushin
9e461ef6e1 Fixed import from external applications 2023-03-29 16:16:54 +03:00
pokamest
1ba301ed16 Merge pull request #201 from amnezia-vpn/bugfix/reset-container-settings-after-adding-new-one
bugfix/reset-container-settings-after-adding-new-one
2023-03-29 15:16:34 +02:00
pokamest
7e663b05d5 Merge pull request #202 from amnezia-vpn/fix/android_various_fixes
Fix/android various fixes
2023-03-29 15:15:17 +02:00
Dmitriy Karpushin
2225a735ca Fixed typo 2023-03-29 12:01:18 +03:00
Dmitriy Karpushin
90c8fbb495 Update Room to fix build on Apple M1 2023-03-29 09:53:18 +03:00
vladimir.kuznetsov
2b14efd3f8 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into bugfix/qssh-too-many-open-connections 2023-03-29 09:44:28 +03:00
vladimir.kuznetsov
3261c36f97 changed the existsAnyServer value to properly display locked settings 2023-03-29 09:44:06 +03:00
vladimir.kuznetsov
c48d65525a set m_installCredentials when visiting the ServerContainers page 2023-03-29 09:44:00 +03:00
vladimir.kuznetsov
5fa6e755b2 changed the existsAnyServer value to properly display locked settings 2023-03-29 09:39:56 +03:00
vladimir.kuznetsov
8bbc0b9e1a set m_installCredentials when visiting the ServerContainers page 2023-03-29 09:38:00 +03:00
Dmitriy Karpushin
3a5317f16a Implementation of "migration manager" to fix placement of config files issue appeared after moving from Qt 5 to Qt 6 2023-03-29 09:31:24 +03:00
Dmitriy Karpushin
c0bb06bf49 Fix of copying to clipboard 2023-03-29 09:31:12 +03:00
Dmitriy Karpushin
8d45af2034 Files now saving with the file picker, not with the sharing mechanism 2023-03-29 09:31:02 +03:00
Dmitriy Karpushin
5f85bf62f5 Missing def check 2023-03-29 09:30:52 +03:00
Dmitriy Karpushin
8fa409d6c1 Restoration of bandwidth meter after closing of GUI 2023-03-29 09:30:45 +03:00
Dmitriy Karpushin
7167c2f20d Fix of "Connect" button state after restoring of an app 2023-03-29 09:29:55 +03:00
Dmitriy Karpushin
20846c8eff * correct behavior of back button on Android
* removing of annoying debug logs on Android
2023-03-29 09:29:06 +03:00
pokamest
1b44a01efd Merge pull request #195 from cyBerta/focus
Camera focus when reading QR
2023-03-28 15:21:54 +02:00
pokamest
c4104dcd33 Merge pull request #196 from cyBerta/android_dev_onboarding
Android dev onboarding documentation
2023-03-28 15:20:53 +02:00
vladimir.kuznetsov
c319c3f520 changed the way to get QSsh::SshConnection, now all resources are cleaned up after use, but the disconnectFromHost function becomes useless 2023-03-27 08:17:41 +03:00
cyberta
85025695df add a section about how to get started for Android developers 2023-03-26 13:59:12 +02:00
vladimir.kuznetsov
f6ca22ecdd Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2023-03-26 11:52:22 +03:00
cyberta
8d9594ba36 add auto-focus to CameraActivity 2023-03-25 23:56:55 +01:00
pokamest
fe7c66cf1d Merge pull request #194 from amnezia-vpn/bugfix/clear-server-from-amnezia
bugfix/clear-server-from-amnezia
2023-03-25 13:33:23 +00:00
vladimir.kuznetsov
b5aa940701 added removal of stopped containers 2023-03-25 15:50:12 +03:00
bakhtiyork
698dfb67d1 iOS - libssh with mbedtls build 2023-03-24 11:41:27 +05:00
vladimir.kuznetsov
8e61d77497 added new controls elements (BasicButtonType, ImageButtonType, LabelWithButtonType, TextFieldWithHeaderType) 2023-03-23 17:49:36 +03:00
pokamest
38f2f1a3e4 Merge pull request #179 from amnezia-vpn/feature/linux-wireguard-implementation
feature/linux-wireguard-implementation
2023-03-21 23:49:39 +00:00
pokamest
b98c6ca5c5 Merge pull request #192 from amnezia-vpn/bugfix/check-server-port-on-dns-container
bugfix/check-server-port-on-dns-container
2023-03-21 23:08:03 +00:00
vladimir.kuznetsov
5641874811 added skip port busy check for DNS container.
- added script execution error check when checking ports busy
2023-03-20 17:29:23 +03:00
pokamest
1dd34035c9 Merge pull request #190 from amnezia-vpn/bugfix/empty-port-when-check-server-ports
bugfix/empty-port-when-check-server-ports
2023-03-20 12:50:08 +00:00
vladimir.kuznetsov
6bf170e273 Merge branch 'bugfix/empty-port-when-check-server-ports' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2023-03-20 08:53:00 +03:00
vladimir.kuznetsov
084ac9b916 added a default port if it is not in the config when scanning the server for busy ports 2023-03-20 08:50:57 +03:00
vladimir.kuznetsov
cebf061f85 Merge branch 'feature/qt6-libssh-support' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2023-03-20 05:47:37 +03:00
vladimir.kuznetsov
5641db0026 uncommented static link for qtkeychain 2023-03-20 05:45:53 +03:00
vladimir.kuznetsov
a42ec8eddb Merge branch 'feature/qt6-libssh-support' of github.com:amnezia-vpn/desktop-client into feature/check-user-in-sudo 2023-03-19 18:04:55 +03:00
vladimir.kuznetsov
ea9917dacc added a script to check the user in the sudo group
- move isServerDpkgBusy to separate script
2023-03-19 17:26:43 +03:00
vladimir.kuznetsov
6272ae842c Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2023-03-19 17:23:18 +03:00
vladimir.kuznetsov
b000eda126 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel 2023-03-19 17:15:13 +03:00
vladimir.kuznetsov
9962bac50b changed using cp to QFile to copy wireguard config 2023-03-19 17:05:48 +03:00
vladimir.kuznetsov
f0c3f1b9ba Merge branch 'feature/linux-wireguard-implementation' of github.com:amnezia-vpn/desktop-client into feature/linux-wireguard-implementation 2023-03-19 15:32:07 +03:00
vladimir.kuznetsov
ec8eeef428 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/linux-wireguard-implementation 2023-03-19 15:06:17 +03:00
pokamest
7eb1a4b489 Fixed certutil path on Windows 2023-03-19 11:58:22 +00:00
pokamest
23b23f0e38 Merge branch 'dev' into feature/linux-wireguard-implementation 2023-03-17 16:18:56 +00:00
pokamest
cba78190a8 iOS build fix 2023-03-16 11:43:18 -07:00
pokamest
e097a49186 Merge pull request #184 from amnezia-vpn/bugfix/fake-web-site-label-wizard
bugfix/fake-web-site-label-wizard
2023-03-16 16:57:29 +00:00
pokamest
e895c784c7 Merge pull request #183 from amnezia-vpn/bugfix/installed-container-button
bugfix/installed-container-button
2023-03-16 16:56:30 +00:00
vladimir.kuznetsov
7e1bcf84f0 fixed saving site from "fake web site" field when configuring openvpn over cloak via wizard 2023-03-16 18:59:06 +03:00
vladimir.kuznetsov
a92f1b82d0 fixed a bug with incorrect port detection when clicking the "scan installed containers" button 2023-03-16 16:47:26 +03:00
vladimir.kuznetsov
433e6901c6 fixed a bug when existing containers were overwritten in the GUI when clicking the "scan installed containers" button 2023-03-16 16:46:29 +03:00
pokamest
e16d835727 CentOS docker autostart fix 2023-03-16 12:35:01 +00:00
pokamest
a5cf2d37d4 Merge pull request #180 from amnezia-vpn/fix/target_sdk_31
Support of targetSdk 31 with its behaviour changes
2023-03-06 12:02:15 +00:00
Dmitriy Karpushin
4bd6fbd445 Support of targetSdk 31 with its behaviour changes 2023-03-06 12:11:37 +03:00
vladimir.kuznetsov
8f18933713 moved the function of checking the availability of wireguard config to ipc client 2023-03-02 17:46:16 +03:00
vladimir.kuznetsov
caad670dbf added wireguard connection implementation for Linux 2023-03-02 10:19:57 +03:00
vladimir.kuznetsov
2d30f86cc6 removed unused qtssh folder 2023-02-28 06:15:01 +03:00
pokamest
1dd79d9e31 Merge pull request #169 from amnezia-vpn/feature/container-existence-on-container-setup
feature/container-existence-on-container-setup
2023-02-27 22:27:10 +00:00
vladimir.kuznetsov
4171afe275 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel 2023-02-27 19:59:01 +03:00
vladimir.kuznetsov
a287192649 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2023-02-27 19:53:53 +03:00
vladimir.kuznetsov
f2e9631af4 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/container-existence-on-container-setup 2023-02-27 19:42:47 +03:00
pokamest
c756ab70ae Merge pull request #168 from amnezia-vpn/feature/port-availability-on-container-setup
feature/port-availability-on-container-setup
2023-02-27 03:26:57 +00:00
pokamest
2e57fe0dfd Merge pull request #177 from amnezia-vpn/feature/android_qr_code_scanner
Qr-code scanner for Android
2023-02-27 00:23:33 +00:00
vladimir.kuznetsov
be39d28be7 renamed selectedServerIndex for android 2023-02-25 18:48:10 +03:00
vladimir.kuznetsov
23a292b8ff Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/container-existence-on-container-setup 2023-02-25 18:22:08 +03:00
vladimir.kuznetsov
cdbb247780 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/port-availability-on-container-setup 2023-02-25 18:21:23 +03:00
vladimir.kuznetsov
69d4f0ce10 removed ContainerProps::containerTypeToString 2023-02-25 18:17:25 +03:00
vladimir.kuznetsov
2580475f67 added a button to scan the server for already installed containers
- refactoring of old code, redundant sections of code removed
2023-02-25 17:59:22 +03:00
pokamest
138789149c Merge branch 'dev' into feature/qt6-libssh-support 2023-02-23 18:46:43 +00:00
pokamest
1be66659d3 Merge pull request #178 from amnezia-vpn/bugfix/linux-missing-lib
bugfix/linux-missing-lib
2023-02-23 18:11:48 +00:00
vladimir.kuznetsov
6d3ba0ae72 added installation of libxkbcommon-x11-0 package for linux runner 2023-02-23 17:32:32 +03:00
vladimir.kuznetsov
04f61677d7 static link for qtkeychain 2023-02-23 17:28:19 +03:00
Dmitriy Karpushin
0096e65fe6 Increased build tools version 2023-02-22 14:48:38 +03:00
Dmitriy Karpushin
b870306c5d Support of multiple-code config 2023-02-22 14:22:03 +03:00
vladimir.kuznetsov
480b2181f0 made error output in the same style
- some code style refactoring
2023-02-22 10:01:43 +03:00
vladimir.kuznetsov
ddc3fe7807 Added the advanced settings page
- added a button to scan the server for installed containers
- added a check on the presence of installed containers before configuring the server, if the containers are already installed, then we will add them to the GUI
- added new control element - PopupWarning.qml
2023-02-20 09:46:50 +03:00
Dmitriy Karpushin
a86e8659f7 CameraActivity with Google ML KIT for decoding QR codes 2023-02-17 16:38:44 +03:00
pokamest
ae10dd639b Merge branch 'dev' into feature/qt6-libssh-support 2023-02-17 01:47:25 +00:00
Shahzain Ali
a0141624b9 Wg fix (#172)
Build fix for iOS
2023-02-15 15:41:18 +00:00
vladimir.kuznetsov
dc137620eb Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/port-availability-on-container-setup 2023-02-14 18:03:19 +03:00
vladimir.kuznetsov
e9b92b216a added a check for port availability when installing up a container
- added wireguard service copying to debug build folder
2023-02-14 18:02:51 +03:00
Nethius
24bf057d17 Merge pull request #174 from amnezia-vpn/fix/qt6_libssh_andorid_build
Fixed libssh android build
2023-02-13 18:13:34 +03:00
Dmitriy Karpushin
b68c6b6807 Little refactoring 2023-02-13 10:42:47 +03:00
pokamest
34a268624b Merge pull request #166 from amnezia-vpn/bugfix/wrong-fields-type-shadowsocks-config
bugfix/wrong-fields-type-shadowsocks-config
2023-02-10 20:22:42 +00:00
Dmitriy Karpushin
cdd527f3ac little fix 2023-02-10 13:57:15 +03:00
pokamest
1f048a6d04 Merge branch 'dev' into bugfix/wrong-fields-type-shadowsocks-config 2023-02-09 13:10:26 +00:00
pokamest
58cf10ffb2 Merge pull request #173 from amnezia-vpn/feature/deploy-unpacked-binaries
feature/added-deploy-binaries-that-are-not-packed-into-the-installer
2023-02-09 13:08:37 +00:00
pokamest
1ef14e129f Update deploy.yml 2023-02-09 11:15:50 +00:00
Dmitriy Karpushin
7c4030aaef fix macos build 2023-02-08 19:09:24 +03:00
Dmitriy Karpushin
c1bf0f8799 [WIP] dynamic linking 2023-02-08 16:06:18 +03:00
vladimir.kuznetsov
4b0a4aa5d2 removed unused code 2023-02-08 16:06:18 +03:00
vladimir.kuznetsov
115be88e5d added check for nullptr in sshclient 2023-02-08 16:06:18 +03:00
vladimir.kuznetsov
268bd8f1a6 added deploy binaries that are not packed into the installer 2023-02-08 09:44:52 +03:00
pokamest
1d9ff17380 Merge pull request #170 from amnezia-vpn/bugfix/cmake-version
bugfix/cmake-version
2023-02-07 17:05:55 +00:00
vladimir.kuznetsov
0fa0d72300 increased required version of cmake for LINUX variable to work properly 2023-02-07 19:45:42 +03:00
pokamest
677d166b1e Merge pull request #164 from amnezia-vpn/feature/cloak-and-ss-in-linux-bundle
feature/cloak-and-ss-in-linux-bundle
2023-02-07 16:27:04 +00:00
vladimir.kuznetsov
b5778a9cb5 if the container already exists, then add it to the list of containers in the client 2023-02-07 10:39:18 +03:00
vladimir.kuznetsov
b2fd94d20e added a check for the existence of the container before installing it 2023-02-06 19:19:49 +03:00
vladimir.kuznetsov
16969bc39b added conversion of the local_port and server_port fields from string to number when saving the shadowsocks config 2023-02-06 08:39:56 +03:00
Dmitriy Karpushin
3943314142 Fix of android build 2023-02-03 19:07:09 +03:00
vladimir.kuznetsov
f7ee532add Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/cloak-and-ss-in-linux-bundle 2023-02-02 13:08:23 +03:00
pokamest
2fdab4c196 Merge pull request #165 from amnezia-vpn/bugfix/cloak-transport-protocol
bugfix/cloak-transport-protocol
2023-02-02 09:17:00 +00:00
vladimir.kuznetsov
e6a95370c1 removed unused code 2023-02-02 08:36:50 +03:00
vladimir.kuznetsov
92907bced3 hardcoded tcp for the openvpn-cloak container 2023-02-02 08:09:07 +03:00
Dmitriy Karpushin
ca30b8b62a Correct path for openssl static lib 2023-02-01 17:16:45 +03:00
vladimir.kuznetsov
da9ac6ff25 added check for nullptr in sshclient 2023-02-01 09:56:55 +03:00
Dmitriy Karpushin
475de5250e New HEAD of qtkeychain (qt6 support) 2023-01-31 18:02:04 +03:00
Dmitriy Karpushin
7a9860ac29 OpenSSL for android build 2023-01-31 17:12:52 +03:00
pokamest
32ca02bcc7 Crash fix on VPN connection 2023-01-31 01:38:49 +00:00
pokamest
ddefb99e5e Merge branch 'dev' into feature/qt6-libssh-support 2023-01-31 00:53:24 +00:00
pokamest
ca4d6e0b2f Android cmake build fix 2023-01-31 00:47:01 +00:00
pokamest
c3fc3a3132 Merge pull request #163 from amnezia-vpn/feature/confirm-on-clear-and-delete-server
feature/confirm-on-clear-and-delete-server
2023-01-30 20:45:35 +00:00
pokamest
78b8a1c36f Merge pull request #162 from amnezia-vpn/bugfix/cloak-transport-protocol
bugfix/cloak-transport-protocol
2023-01-30 20:43:15 +00:00
pokamest
638c3492d6 Merge pull request #159 from amnezia-vpn/bugfix/linux-uninstall
bugfix/linux-uninstall
2023-01-30 20:37:46 +00:00
vladimir.kuznetsov
4c1699935c added binaries for cloak and shadowsocks to Linux bundle 2023-01-30 12:41:51 +03:00
vladimir.kuznetsov
25829451c8 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel 2023-01-29 09:52:12 +03:00
vladimir.kuznetsov
74fbce8b96 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2023-01-29 09:43:03 +03:00
vladimir.kuznetsov
542039df01 Changed notification text for "Forget this server" action 2023-01-29 09:01:48 +03:00
vladimir.kuznetsov
d652ecff21 For the openvpn-cloak container, the choice of the transport protocol in the openvpn settings is blocked 2023-01-29 08:39:31 +03:00
vladimir.kuznetsov
00c4cf300a fixed the width of the buttons in popupWithQuestion 2023-01-27 19:56:39 +03:00
vladimir.kuznetsov
da47054497 changed element type to confirm container deletion from MessageDialog to PopupWithQuestion
- fixed "back" button availability for readonly servers
2023-01-27 18:37:08 +03:00
vladimir.kuznetsov
051a2a3ef2 Added popup to confirm actions "Clear server from Amnesia software" and "Forget this server" 2023-01-27 10:25:14 +03:00
vladimir.kuznetsov
ee609f3e8f fixed warning with QFutureWatcher
- renamed readWireguardConfiguration function to match what it does
2023-01-24 09:43:45 +03:00
vladimir.kuznetsov
eb66354c76 fixed path to maintenancetool in linux
- added x11 to runningOnLinux() function
2023-01-22 08:26:29 +03:00
vladimir.kuznetsov
c7fb7e58cf Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into bugfix/linux-uninstall 2023-01-21 10:35:29 +03:00
vladimir.kuznetsov
c2b02a45a2 fixed path to linux install folderfixed path to installed application in linux 2023-01-21 10:35:01 +03:00
pokamest
e7ed532545 Disable fastline for iOS while it not fixed 2023-01-19 21:08:57 +00:00
pokamest
2a031320c2 Merge pull request #156 from amnezia-vpn/bugfix/wrong-artifacts-size
added qtshadertools to all targets
2023-01-19 20:59:00 +00:00
vladimir.kuznetsov
d0379fdede added qtshadertools to all targets 2023-01-19 18:36:54 +03:00
vladimir.kuznetsov
45016b76e7 moved crl-verify crl.pem to openvpn config templates 2023-01-19 17:49:17 +03:00
pokamest
ee8cd8ef26 Merge pull request #118 from amnezia-vpn/qt_migration
Migration to Qt6
2023-01-19 13:09:00 +00:00
pokamest
18d89e9cad Merge pull request #152 from amnezia-vpn/feature/android_qt6_moving
Moving to Qt 6 and cmake on Android client
2023-01-19 12:51:02 +00:00
pokamest
623c8ca6b0 Merge pull request #155 from amnezia-vpn/feature/android_bandwidth_counter
Fix of bandwidth counter for Android
2023-01-19 12:38:55 +00:00
Dmitriy Karpushin
39736e865e Merge branch 'feature/android_qt6_moving' into feature/android_bandwidth_counter
# Conflicts:
#	client/platforms/android/android_controller.cpp
#	client/platforms/android/android_controller.h
2023-01-19 14:09:12 +03:00
vladimir.kuznetsov
8ea80a616e Merge branch 'qt_migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel 2023-01-18 20:06:01 +03:00
vladimir.kuznetsov
c5df7f9bb7 added diagrams describing the process of obtaining information about clients 2023-01-18 19:55:12 +03:00
Dmitriy Karpushin
92374966fb Removing of unnecessary command 2023-01-18 16:12:30 +03:00
Dmitriy Karpushin
6bebfb861c Little cleanup 2023-01-18 15:54:19 +03:00
Dmitriy Karpushin
30ae13b245 Fix of signing code 2023-01-18 15:38:06 +03:00
pokamest
891f990e35 Merge pull request #154 from amnezia-vpn/dev
Release 2.1.2
2023-01-18 12:22:18 +00:00
Dmitriy Karpushin
2118327ae0 Fixes in path of build 2023-01-18 14:47:11 +03:00
Dmitriy Karpushin
6aed2902a7 Fixes in path of build 2023-01-18 14:37:58 +03:00
Dmitriy Karpushin
e149e32ce1 Changing the set of highlights 2023-01-18 11:36:16 +03:00
Dmitriy Karpushin
41f2af8c4e Some highlights were added 2023-01-18 11:27:01 +03:00
Dmitriy Karpushin
016f808345 Removing of unnecessary command 2023-01-18 11:11:27 +03:00
Dmitriy Karpushin
bc69524654 Changing of path of keystore location 2023-01-18 11:06:58 +03:00
Dmitriy Karpushin
3c6280c419 Changing of path of keystore location 2023-01-18 10:54:24 +03:00
pokamest
9d01a52a4a Merge pull request #145 from amnezia-vpn/feature/qt6-server-busy-notification
feature/qt6-server-busy-notification
2023-01-18 00:43:13 +00:00
pokamest
a8273a8fdc Merge pull request #153 from amnezia-vpn/bugfix/some-ui-small-fixes
bugfix/some-ui-small-fixes
2023-01-18 00:41:11 +00:00
vladimir.kuznetsov
d6d3bf6943 moved certificate content acquisition from ClientManagementLogic to ClientInfoLogic 2023-01-17 21:04:15 +03:00
vladimir.kuznetsov
f6e8346841 moved getClientsList and setClientsList from serverController 2023-01-17 18:41:36 +03:00
vladimir.kuznetsov
b9717e9894 removed unused code 2023-01-17 17:11:45 +03:00
Dmitriy Karpushin
6b3209e6ee Changing of the way of keystore fetching 2023-01-17 16:59:34 +03:00
Dmitriy Karpushin
0a6da5ead1 Platform version fix 2023-01-17 16:23:34 +03:00
Dmitriy Karpushin
53441148b8 Revert of Gradle upgrade 2023-01-17 16:12:42 +03:00
Dmitriy Karpushin
732d018819 Revert "Shadowsocks manifest fix"
This reverts commit e261a8ba21.
2023-01-17 16:09:06 +03:00
Dmitriy Karpushin
e261a8ba21 Shadowsocks manifest fix 2023-01-17 15:53:54 +03:00
Dmitriy Karpushin
c3c87bff74 Fix of GitHub Actions build 2023-01-17 15:34:37 +03:00
Dmitriy Karpushin
c3f423aad5 Little cleanup 2023-01-17 15:34:37 +03:00
pokamest
580975fda1 Merge branch 'qt_migration' into feature/qt6-server-busy-notification 2023-01-16 18:13:07 +00:00
pokamest
9f114a1dad Tiny fix [no ci] 2023-01-16 18:12:30 +00:00
pokamest
0ae93d0657 Merge pull request #144 from amnezia-vpn/refactoring/logging
refactoring/logging
2023-01-16 17:29:24 +00:00
vladimir.kuznetsov
3a210c5bab added wireguard key revocation 2023-01-16 20:24:37 +03:00
pokamest
44d2627e2a Tiny fix [no ci] 2023-01-16 17:11:00 +00:00
pokamest
6e882760f1 Merge branch 'qt_migration' into refactoring/logging 2023-01-16 16:10:39 +00:00
pokamest
ff79ffd1c8 Android tag deploy fix 2023-01-16 15:10:57 +00:00
vladimir.kuznetsov
3175b0c4ff Changed the indentation of the "Installed Protocols and Services" heading on the "Server Containers" page 2023-01-16 16:20:12 +03:00
Dmitry Karpushin
21779395ef Merge branch 'qt_migration' into feature/android_qt6_moving 2023-01-16 14:58:01 +03:00
Dmitriy Karpushin
32cbb698ee Support of apk signing for tag-deploy workflow 2023-01-16 14:30:08 +03:00
vladimir.kuznetsov
3f99c52349 change Flickable to FlickableType for ClientManagement and ClientInfo pages 2023-01-16 12:37:14 +03:00
vladimir.kuznetsov
19a41b2792 swapped "Clear client cached profile" and "Clear server from Amnesia software" buttons 2023-01-15 18:47:16 +03:00
vladimir.kuznetsov
599910daea added openvpn certificate revocation 2023-01-15 18:09:05 +03:00
vladimir.kuznetsov
bee42ea2fb fixed double call onEditingFinished when pressing Enter 2023-01-14 18:30:08 +03:00
vladimir.kuznetsov
221ea5ebb0 Merge branch 'qt_migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-server-busy-notification 2023-01-13 16:59:03 +03:00
vladimir.kuznetsov
f24df9fb05 Merge branch 'qt_migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel 2023-01-12 20:28:13 +03:00
vladimir.kuznetsov
ce2a122d51 added busy indicator when saving a list of clients, on the client info panel 2023-01-12 20:20:24 +03:00
Dmitriy Karpushin
e8242aec85 Android build script fix 2023-01-12 15:36:31 +03:00
Dmitriy Karpushin
6ed9dcbe93 Workflow build script fix 2023-01-12 15:19:39 +03:00
Dmitriy Karpushin
58371e6e43 New trigger for a workflow 2023-01-12 15:12:55 +03:00
Dmitriy Karpushin
2d8957489e Trigger alternative syntax 2023-01-12 14:55:11 +03:00
Dmitriy Karpushin
1fd0794bfb Workflow file formatting fix 2023-01-12 14:30:25 +03:00
Dmitriy Karpushin
58da60985f Error fix 2023-01-12 14:21:14 +03:00
Dmitriy Karpushin
6b6a3cd38e [WIP] Android release workflow test 2023-01-12 14:16:05 +03:00
pokamest
4b1df16ecf Merge pull request #148 from amnezia-vpn/feature/github-actions-artifacts
feature/github-actions-artifacts
2023-01-12 01:22:41 +00:00
vladimir.kuznetsov
24ea686e4d added busy indicator when loading a list of clients, on the client management panel 2023-01-11 21:36:18 +03:00
vladimir.kuznetsov
a7030cdcb9 added saving the list of clients for wireguard
- added error handling when getting/saving a list of clients
2023-01-11 20:36:47 +03:00
vladimir.kuznetsov
8c137ecc52 added page to display WireGuard client information 2023-01-10 16:21:45 +03:00
Dmitriy Karpushin
20e44aa891 Re-enabled multi-abi build 2023-01-10 13:19:19 +03:00
vladimir.kuznetsov
118bb53c03 fixed path to linux installer 2023-01-09 16:41:24 +03:00
Dmitriy Karpushin
7c3be9f0b0 Update of NDK version 2023-01-09 14:21:10 +03:00
Dmitriy Karpushin
d1990a4263 Adopted GitHub Actions build config for Qt6 2023-01-09 13:46:45 +03:00
vladimir.kuznetsov
396422ee3a increased storage time for artifacts up to 3 days 2023-01-09 12:44:36 +03:00
vladimir.kuznetsov
f735b401df added deploy artifacts to github actions, artifact lifetime 1 day 2023-01-09 12:41:04 +03:00
vladimir.kuznetsov
a42beb86c0 added client management panel
- added classes for displaying the client management panel
- added class for displaying the client info
- added page to display a list of clients
- added page to display OpenVpn client information
- added diagram with OpenVpn certificate revocation process
2023-01-09 12:38:01 +03:00
pokamest
85020270d5 MacOS deploy fix 2023-01-08 17:21:51 -08:00
pokamest
b1b9044021 Merge branch 'qt_migration' into refactoring/logging 2023-01-08 23:17:11 +00:00
pokamest
8da30b216f Cleanup 2023-01-08 23:10:46 +00:00
pokamest
167d3caa5d Merge branch 'dev' into qt_migration 2023-01-08 23:00:13 +00:00
pokamest
3259e6f0e8 Merge pull request #128 from amnezia-vpn/feature/ovpn-config-import
added import of configs in openvpn and wireguard formats
2023-01-08 22:26:39 +00:00
pokamest
64526c5232 Various ui fixes 2023-01-08 21:24:06 +00:00
pokamest
d9630afafd Merge branch 'dev' into feature/ovpn-config-import 2023-01-08 19:36:00 +00:00
pokamest
c8c6e62aa0 Merge pull request #141 from amnezia-vpn/add-scrollbar-on-flickables
Show Scrollbars whenever the scroll is not obvious
2023-01-08 12:32:55 +00:00
pokamest
7f561c30b3 Buttons margins 2023-01-08 12:32:07 +00:00
pokamest
1d8f342417 QML refactoring 2023-01-07 13:40:35 +00:00
vladimir.kuznetsov
6ec090ea0d added a "Cancel" button to interrupt the server configuration process when it is found that it is busy installing other software 2023-01-02 17:32:27 +03:00
vladimir.kuznetsov
08a8eadb49 added display of a notification that the server is busy installing third-party software
- refactoring doInstallAction functions
2023-01-01 22:08:39 +03:00
Dmitriy Karpushin
3e2835bef6 Rolling back GitHub Actions config 2022-12-29 15:04:42 +03:00
vladimir.kuznetsov
686fc754b2 renamed log class in service project to logger 2022-12-28 17:56:31 +03:00
Dmitriy Karpushin
ea17124d6d Fix of build type for GitHub Actions 2022-12-28 16:35:25 +03:00
Dmitriy Karpushin
4000041308 Fix of build type 2022-12-28 15:55:03 +03:00
Dmitriy Karpushin
1a50ed0316 Increased java version on runner 2022-12-28 14:45:45 +03:00
Dmitriy Karpushin
42038cd6e7 Fixed filenames 2022-12-28 14:26:44 +03:00
Dmitriy Karpushin
44c5b41cc7 Little fix 2022-12-28 13:57:41 +03:00
Dmitriy Karpushin
da7bd91514 Little fix 2022-12-28 13:52:14 +03:00
Dmitriy Karpushin
0206623c6f Correct way to set up QT_HOST_PATH variable 2022-12-28 13:42:29 +03:00
vladimir.kuznetsov
3b2948d4dd renamed debug class to logger 2022-12-28 13:41:45 +03:00
Dmitriy Karpushin
918aeb670e Added QT_HOST_PATH variable 2022-12-28 13:37:56 +03:00
Dmitriy Karpushin
fd9fec48a2 Replacing of qmake on cmake for GitHub Actions 2022-12-28 13:10:34 +03:00
vladimir.kuznetsov
77e51b40b8 removed unused logger 2022-12-28 13:09:33 +03:00
vladimir.kuznetsov
195663c6e3 Added activation and deactivation of logging without restarting the application 2022-12-28 06:52:02 +03:00
vladimir.kuznetsov
ce4ca5c4d5 Added display of a notification about the inclusion of logging on the main screen 2022-12-28 06:50:46 +03:00
Dmitriy Karpushin
3e276c4111 GitHub Actions fix #2 2022-12-27 20:06:11 +03:00
Dmitriy Karpushin
41a4dc2fa2 GitHub Actions fix 2022-12-27 20:00:45 +03:00
Dmitriy Karpushin
7851047421 multi-abi support 2022-12-27 17:54:14 +03:00
Dmitriy Karpushin
a30e478cbd Fix of cmake build 2022-12-27 17:14:44 +03:00
Dmitriy Karpushin
ad4b3dfad1 [WIP] cmake build for android 2022-12-27 15:37:58 +03:00
Dmitriy Karpushin
ad7fc937a9 Added missing files 2022-12-27 11:10:01 +03:00
vladimir.kuznetsov
fd905ef308 added margin for scrollbars for almost all flickable elements 2022-12-26 19:07:05 +03:00
pokamest
3f257af7a9 Merge pull request #131 from amnezia-vpn/qmake-to-cmake-migration
Qmake to cmake migration
2022-12-26 14:52:40 +00:00
vladimir.kuznetsov
030bb8fe76 Merge branch 'qt_migration' of github.com:amnezia-vpn/desktop-client into qmake-to-cmake-migration 2022-12-26 17:29:52 +03:00
pokamest
131601d9d2 Merge pull request #142 from amnezia-vpn/qt-migration-cleanup
Qt migration cleanup
2022-12-26 14:16:03 +00:00
vladimir.kuznetsov
64317ffef5 fixed deploy service additional data for debug target 2022-12-26 17:15:45 +03:00
vladimir.kuznetsov
911e65af55 Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2022-12-26 17:08:27 +03:00
Dmitriy Karpushin
82165eaf37 1) Fixed theme
2) Fixed VPN connection
2022-12-26 14:00:45 +03:00
vladimir.kuznetsov
4a75f2ebca Moved ssh lib wrapper from SshSession to SshClient 2022-12-26 12:43:51 +03:00
vladimir.kuznetsov
be39b3be8c implementation of sending commands via ssh_channel_request_exec() 2022-12-26 10:12:42 +03:00
vladimir.kuznetsov
50e8aff8fa added ssh_channel_close() in ShhSession 2022-12-25 15:46:56 +03:00
pokamest
804a790392 FlickableType added 2022-12-24 16:41:53 +00:00
vladimir.kuznetsov
d04566a6c4 fix for macos build 2022-12-24 18:21:08 +03:00
Dmitriy Karpushin
6c614a4b3c Moving to Qt6:
1) removing of deprecated classes
2) update of IPC mechanism
2022-12-23 17:32:20 +03:00
vladimir.kuznetsov
3277717a7f Added error handling
Added write to channel in callbacks
2022-12-23 14:50:48 +03:00
vladimir.kuznetsov
f9b2829396 removed linking with botan and qssh 2022-12-23 10:13:06 +03:00
vladimir.kuznetsov
81cf108471 moved and formatted code for sftp to sshSession class 2022-12-22 19:55:30 +03:00
vladimir.kuznetsov
5075fe358e added callbacks for output from a remote host 2022-12-21 08:13:06 +03:00
vladimir.kuznetsov
c8085a368f added class to open ssh connection using libssh and write data to ssh channel 2022-12-20 13:43:46 +03:00
Shahzain Ali
8191c25dd7 Delete amnezia-ios-certificates 2022-12-20 00:37:30 +05:00
Shahzain Ali
dc4b2bd52e added submodule 2022-12-20 00:22:12 +05:00
Shahzain Ali
ca60afbcee Update deploy.yml 2022-12-19 17:06:47 +05:00
Shahzain Ali
374b74b710 Update deploy.yml 2022-12-19 17:03:33 +05:00
Shahzain Ali
ae0d3d78cd Testflight upload test 2022-12-19 17:02:25 +05:00
vladimir.kuznetsov
f9f197afd0 removed unused code 2022-12-18 19:36:19 +03:00
vladimir.kuznetsov
93c43ecbc3 removed unused qzxing folder 2022-12-18 18:27:20 +03:00
vladimir.kuznetsov
1fd1b0388b removed unused code 2022-12-18 18:27:08 +03:00
vladimir.kuznetsov
833364a94e added SortFilterProxyModel submodule 2022-12-18 18:11:41 +03:00
vladimir.kuznetsov
893c105bf2 removed SortFilterProxyModel sources 2022-12-18 18:07:32 +03:00
vladimir.kuznetsov
e481bd4ec5 added deploy artifacts to github actions, artifact lifetime 1 day 2022-12-18 09:45:26 +03:00
vladimir.kuznetsov
b0489aa61b Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2022-12-18 09:17:35 +03:00
vladimir.kuznetsov
376bc29e95 set OPENSSL_SSL_LIBRARY for ios 2022-12-17 22:18:14 +03:00
vladimir.kuznetsov
bd22e330a7 set OPENSSL_CRYPTO_LIBRARY for ios
- removed linking with brew openssl for ios
2022-12-17 22:02:38 +03:00
vladimir.kuznetsov
9ce7114f8c added variables for OpenSSL 2022-12-17 21:48:45 +03:00
vladimir.kuznetsov
1303da1c20 openedsl linking method changed 2022-12-17 21:34:59 +03:00
vladimir.kuznetsov
c6bb33fa84 added display of "pure" config if it was imported in native format
- changed the method of passing the isThirdPartyConfig parameter to page logic
- removed adding hostname to the server name when importing configs in native format
- fixed display of the "$proto settings" button when clicking on the protocol on the "Installed services" page
2022-12-17 21:00:48 +03:00
vladimir.kuznetsov
22939a6707 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/ovpn-config-import 2022-12-17 17:27:26 +03:00
Hamza ARBI
9222877306 Show Scrollbars whenever the scroll is not obvious 2022-12-17 12:06:19 +01:00
Shahzain Ali
5d8264e854 Update launch.png 2022-12-16 18:48:14 +05:00
pokamest
77124e098c Merge branch 'qt_migration' into qmake-to-cmake-migration 2022-12-16 04:45:43 -08:00
pokamest
bd0a70d024 Merge pull request #140 from amnezia-vpn/bugfix/drawer-clickability
Bugfix/drawer-clickability
2022-12-16 13:43:49 +01:00
Shahzain Ali
914700712e OpenSSL finding issue fixed. 2022-12-16 15:27:06 +05:00
vladimir.kuznetsov
80d792915a fixed clickability of "drawer" elements
- added Qt.PointingHandCursor to SelectContainer drawer
- fixed some warnings
2022-12-15 21:16:59 +03:00
Dmitriy Karpushin
54dc363231 iOS fix + Android connection status restoration fix 2022-12-15 18:46:15 +03:00
pokamest
36c436af50 gitignore fix 2022-12-15 11:26:25 +01:00
Shahzain Ali
73eb9259e2 Update CMakeLists.txt 2022-12-15 14:26:45 +05:00
pokamest
951d915326 libssh init 2022-12-14 21:50:52 +01:00
vladimir.kuznetsov
14c25480ce changed working directory to call openvpn.sh 2022-12-14 22:26:06 +03:00
vladimir.kuznetsov
77d87f8c50 set working directory to call openvpn.sh 2022-12-14 21:55:51 +03:00
vladimir.kuznetsov
ab389d4817 for osxtools and networkextension/CMakeLists.txt CMAKE_CURRENT_SOURCE_DIR changed to CLIENT_ROOT_DIR 2022-12-14 21:29:33 +03:00
vladimir.kuznetsov
58b9e0cd7c for osxtools and networkextension/CMakeLists.txt CMAKE_CURRENT_LIST_DIR changed to CMAKE_CURRENT_SOURCE_DIR 2022-12-14 21:16:24 +03:00
vladimir.kuznetsov
ed2f5af204 Removed "cd client" for ios, also changed CMAKE_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR.
Removed duplicate deployment files for macos
2022-12-14 20:58:49 +03:00
vladimir.kuznetsov
5b2f1f8969 processing of 3rdparty libraries moved to a separate cmake file 2022-12-14 20:32:13 +03:00
vladimir.kuznetsov
a2122cb7d7 moved changes from .pro file 2022-12-14 19:55:14 +03:00
vladimir.kuznetsov
d680702b15 change path to cmake folder 2022-12-14 19:17:58 +03:00
vladimir.kuznetsov
d15de499dc Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into qmake-to-cmake-migration 2022-12-14 19:16:38 +03:00
vladimir.kuznetsov
bd382e3cc7 moved the cmake folder to client root folder 2022-12-14 19:16:12 +03:00
Dmitriy Karpushin
d417fa58ab OpenVPN bandwidth counter for Android 2022-12-14 18:52:19 +03:00
Shahzain Ali
ca9cb997b5 Fixed openVPN issue.
Now OpenVPN moved to main target and fixed search path issue, becuase I face below error while archiving. Invalid Bundle. The bundle at 'AmneziaVPN.app/PlugIns/AmneziaVPNNetworkExtension.appex' contains disallowed nested bundles.
2022-12-14 17:28:16 +05:00
Shahzain Ali
ebd920f3b2 Setting target membership on Media.xcassets 2022-12-14 16:56:20 +05:00
vladimir.kuznetsov
a611ddea2d removed environment OPENSSL_ROOT_DIR variable 2022-12-13 23:52:43 +03:00
vladimir.kuznetsov
75614e0bbb set environment OPENSSL_ROOT_DIR variable 2022-12-13 23:39:58 +03:00
vladimir.kuznetsov
dafef6463a added:
- set PKG_CONFIG_PATH for openssl
- use find_package for precompiled openssl

removed:
- set CMAKE_PREFIX_PATH for openssl
- renaming ios openssl libs after copying to bin dir
2022-12-13 21:39:02 +03:00
vladimir.kuznetsov
61d502eea4 removed find_package for openssl 2022-12-13 20:49:46 +03:00
vladimir.kuznetsov
71aa525dfd set CMAKE_PREFIX_PATH for openssl 2022-12-13 20:36:12 +03:00
vladimir.kuznetsov
c0e3875dfd renaming ios openssl libs after copying to bin dir 2022-12-13 20:23:17 +03:00
pokamest
9c188e0acd Merge branch 'qt_migration' into qmake-to-cmake-migration 2022-12-13 15:34:38 +01:00
pokamest
1de143362c Merge branch 'dev' into qt_migration 2022-12-13 15:09:05 +01:00
vladimir.kuznetsov
7e37b6c151 removed CMAKE_PREFIX_PATH for openssl 2022-12-12 22:22:08 +03:00
vladimir.kuznetsov
0fa84a8b84 set CMAKE_PREFIX_PATH for openssl 2022-12-12 21:39:27 +03:00
vladimir.kuznetsov
236ae57d01 use find_package for precompiled openssl 2022-12-12 20:50:23 +03:00
pokamest
7345f464a5 Merge pull request #138 from amnezia-vpn/feature/android_config_export_import
Export/import of configuration files on Android
2022-12-12 16:48:23 +01:00
pokamest
3c45f2abe2 Merge branch 'dev' into feature/ovpn-config-import 2022-12-12 14:42:12 +01:00
pokamest
9c5e1faf46 Build fixes 2022-12-12 14:41:54 +01:00
pokamest
ce02d3a829 Merge branch 'dev' into feature/ovpn-config-import 2022-12-12 14:01:57 +01:00
pokamest
1b80c59e65 Merge pull request #137 from amnezia-vpn/bugfix/config-without-containers-import
bugfix: import config without containers
2022-12-12 13:30:28 +01:00
Hamza ARBI
f20f528a11 Server selection always in range (#130)
* Server selection stays always in the list's range
* Removed the usage of QZxing module from PageQrDecoder page
* Fixed null spelling on qml instead of nil
2022-12-12 13:28:03 +01:00
dartsyms
814b66c04a Various fixes for iOS (#126)
* Readme update, solution for wireguard make in M1 machines,
* import file and restore enabled.
* xcode_patcher.rb fixed, Now no need to add openVPN framewrok in Embed frameworks manually.
* Now xcode_patcher.rb will add OpenVPN Framework to Embed Frameworks in main target, instead of Network extension.
* Update iosvpnprotocol.swift
* Protocol wasn't detected because it is working on localized description of tunnel, fixed cases.
* Code cleanup
* Speed issue fixed for wireguard.
* GetDeviceIp and bytes(speed of OpenVPN) fixed.
*Device IP method wasn't working as expected, so I replaced. and for speed in OpenVPN we need to handle message seperately for bytes.
*QR progress added with progressbar and text.
2022-12-12 13:16:12 +01:00
vladimir.kuznetsov
00ad2e7a80 added path to openssl libs for ios 2022-12-11 18:25:44 +03:00
vladimir.kuznetsov
8f7e5e491f fixed macos openssl lib types 2022-12-11 17:59:18 +03:00
vladimir.kuznetsov
19101176a7 added link_libraries() for zlib 2022-12-11 17:22:59 +03:00
vladimir.kuznetsov
0bc383fec2 Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2022-12-11 17:09:26 +03:00
vladimir.kuznetsov
4df918d6a5 added qtshadertools to actions and cmake
- cleaned up CMakeLists in client project
2022-12-11 10:26:31 +03:00
Shahzain Ali
d3cbd8cdae Update deploy.yml 2022-12-11 04:21:28 +05:00
Shahzain Ali
0fa5dc225c Reverting shadertools in cmake. 2022-12-11 04:19:24 +05:00
Shahzain Ali
b14f14c45a Update CMakeLists.txt 2022-12-11 04:09:45 +05:00
Shahzain Ali
0851f4fdd4 Added Qt6ShaderTools in cmake 2022-12-11 04:01:15 +05:00
Shahzain Ali
807b3370e7 Adding qtshadertools module in qt installation 2022-12-11 03:42:46 +05:00
Shahzain Ali
a0f114e15c Fixing openvpn 2022-12-11 03:22:59 +05:00
vladimir.kuznetsov
1401fcd97d disabled some libssh options 2022-12-10 20:15:05 +03:00
vladimir.kuznetsov
efcd291e65 Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2022-12-10 19:07:00 +03:00
vladimir.kuznetsov
f98792714e set working directory to call openvpn.sh 2022-12-10 18:46:17 +03:00
vladimir.kuznetsov
5649f85b58 set QT_HOST_PATH for ios target 2022-12-10 18:09:41 +03:00
vladimir.kuznetsov
cfaba932e0 changeGed libz lib name for linux target 2022-12-10 18:00:50 +03:00
vladimir.kuznetsov
b1db4e8a7a Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2022-12-10 17:58:57 +03:00
vladimir.kuznetsov
ab9c11e038 set ios root dir as CMAKE_PREFIX_PATH 2022-12-09 18:12:39 +03:00
vladimir.kuznetsov
4d621dcbfe set CMAKE_PREFIX_PATH in CMakeLists file 2022-12-09 17:44:57 +03:00
vladimir.kuznetsov
a45537cbf3 added DCMAKE_PREFIX_PATH to IOS target 2022-12-09 17:30:46 +03:00
vladimir.kuznetsov
2d3ac286ac skip section with openssl copy for linux 2022-12-09 16:18:02 +03:00
vladimir.kuznetsov
4e96b5d4a6 added libz lib name for linux target 2022-12-09 15:57:31 +03:00
Shahzain Ali
9294324732 fixing host path 2022-12-09 04:24:16 +05:00
Shahzain Ali
b92422594b Merge branch 'qmake-to-cmake-migration' of https://github.com/amnezia-vpn/desktop-client into qmake-to-cmake-migration 2022-12-09 04:13:37 +05:00
Shahzain Ali
ea2637b1b4 Setting QT_BUILD_TOOLS_WHEN_CROSS_COMPILING ON 2022-12-09 04:13:14 +05:00
Shahzain Ali
c97b4859c1 Update deploy.yml 2022-12-09 04:05:25 +05:00
Shahzain Ali
7a2f42de30 Update deploy.yml 2022-12-09 03:58:36 +05:00
Shahzain Ali
99f5f78fc7 Update deploy.yml 2022-12-09 03:48:12 +05:00
Shahzain Ali
668f0ca675 Update deploy.yml 2022-12-09 03:47:09 +05:00
Shahzain Ali
6a89a51ea6 added QT_TOOL_CHAIN for ios cmake 2022-12-09 03:38:29 +05:00
Shahzain Ali
df6b0f3945 Update deploy.yml 2022-12-09 03:11:31 +05:00
Shahzain Ali
65cf243373 Update deploy.yml 2022-12-09 03:10:26 +05:00
Shahzain Ali
2ef7813219 Update deploy.yml 2022-12-09 03:06:16 +05:00
Shahzain Ali
216efd74bf Update deploy.yml 2022-12-09 03:04:43 +05:00
Shahzain Ali
b9d027a44a Update deploy.yml 2022-12-09 03:03:17 +05:00
Shahzain Ali
9097dd9645 actions for ios using cmake 2022-12-09 02:59:35 +05:00
Shahzain Ali
d784e26913 MacOS issue fixed. 2022-12-09 02:33:46 +05:00
vladimir.kuznetsov
cb69298385 Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-libssh-support 2022-12-08 21:41:33 +03:00
vladimir.kuznetsov
a8fc42a17e added copying OpenSSL libraries, for windows and macos, to the folder with binaries, because we have the wrong folder structure with the OpenSSL library 2022-12-08 21:40:51 +03:00
Shahzain Ali
005008814a icon added in cmake. 2022-12-08 21:34:55 +05:00
Shahzain Ali
ad3bbaedb3 getting openvpn.sh script message. 2022-12-08 18:22:07 +05:00
Dmitriy Karpushin
cad0dabe42 Export/import of configuration filed on Android 2022-12-08 11:51:28 +03:00
Shahzain Ali
48fa3c8aec Update CMakeLists.txt 2022-12-07 20:36:22 +05:00
Shahzain Ali
fb585cbac0 OpenVPN integrated successfully 2022-12-07 20:35:43 +05:00
Shahzain Ali
dd1adda1a6 postbuild command fix. 2022-12-07 00:19:02 +05:00
vladimir.kuznetsov
3742583508 added zlib to submodules. Added build and link zlib, libssh in CMakeLists.txt 2022-12-06 18:17:10 +03:00
Shahzain Ali
3c6cd623af version issues fixed 2022-12-06 19:18:38 +05:00
Shahzain Ali
70c6e69b36 updatinf info.plist for .vpn type. 2022-12-06 03:09:45 +05:00
Shahzain Ali
943e58d32a Wireguard working. 2022-12-06 02:47:46 +05:00
Shahzain Ali
5237058016 Added launcher 2022-12-06 02:18:45 +05:00
Shahzain Ali
b87c5f8a51 iOS building successfully
Need to remove postbuild commands most probably from osxtools.cmake
2022-12-06 00:42:48 +05:00
Shahzain Ali
43e7a03af4 Some fixes.
Now team is preselected in signing.
2022-12-05 20:47:12 +05:00
pokamest
19fce4975d Merge branch 'dev' into feature/ovpn-config-import 2022-12-04 22:04:51 +01:00
pokamest
a9217810e7 Remove travis builds and tiny refactoring 2022-12-04 21:54:22 +01:00
Mykola Baibuz
a87610c856 Use libssh for server setup script
That gives some advantages in supported key types.
2022-12-04 01:43:53 +03:00
vladimir.kuznetsov
0ec0cb1b19 feature: added libssh submodule 2022-12-04 01:43:34 +03:00
vladimir.kuznetsov
9b1678a06c Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into bugfix/config-without-containers-import 2022-12-03 15:26:32 +03:00
vladimir.kuznetsov
0da63062d7 bugfix: fixed transition to the "Installed services" page when importing a config that does not have installed containers 2022-12-03 15:23:52 +03:00
Shahzain Ali
c8dd12eb20 Some more progress in cmake
Still have errors, currently not using apple-compile.sh building completely using cmake.
2022-12-02 22:26:10 +05:00
Shahzain Ali
008592f13b Architecture change not needed for ios build
CMAKE_OSX_ARCHITECTURES not needed for ios, it is setting x86_64 for all targets in ios.
2022-12-02 15:07:05 +05:00
vladimir.kuznetsov
56b9972053 build script for macos now uses cmake 2022-12-01 20:26:00 +03:00
vladimir.kuznetsov
1335c94bbc added include directory for botan ios 2022-12-01 20:24:04 +03:00
vladimir.kuznetsov
21a6ab369e Merge branch 'qmake-to-cmake-migration' of github.com:amnezia-vpn/desktop-client into qmake-to-cmake-migration 2022-12-01 20:11:56 +03:00
vladimir.kuznetsov
2a80117d42 Merge remote-tracking branch 'remotes/origin/qt6-github-actions' into qmake-to-cmake-migration 2022-12-01 20:05:36 +03:00
Shahzain Ali
e65d312503 Merge branch 'qmake-to-cmake-migration' of https://github.com/amnezia-vpn/desktop-client into qmake-to-cmake-migration 2022-12-01 20:40:00 +05:00
Shahzain Ali
5fc34e643c Adding network extenstionn, fixing cmake.
Botan cmake changes, cmake APPLE/IOS fixes, wireguard added, Currently removed openvpn implementation, once wireguard is stable then will add openVPN framework.
Current progress is it is generating xcode project using
mkdir build-ios
/Users/shahzainali/Qt/6.4.1/ios/bin/qt-cmake . -B build-ios -GXcode
Need to select team only for Network extension only. select AmneizaVPN to run.
current issue is related to Botan.
2022-12-01 20:26:45 +05:00
pokamest
3463a84903 Merge branch 'qt_migration' into qmake-to-cmake-migration 2022-11-30 15:02:55 +01:00
pokamest
48dc532de6 Merge branch 'dev' into qt_migration 2022-11-30 14:26:44 +01:00
Shahzain Ali
20cb62483f Moved all libraries to LIBS variable 2022-11-30 15:36:25 +05:00
pokamest
dcb5828313 GitHub actions (#133)
GitHub actions
2022-11-30 01:51:18 +01:00
pokamest
74860256b9 Merge pull request #136 from amnezia-vpn/bugfix/notarize-app-macos
fixed options parsing for enable macos NOTARIZE_APP
2022-11-30 01:21:19 +01:00
vladimir.kuznetsov
97457f17c1 fixed options parsing for enable macos NOTARIZE_APP 2022-11-29 22:11:02 +03:00
Shahzain Ali
de9167cae6 Frameworks, libcrypto, libssl and some properties added for iOS. 2022-11-29 18:00:59 +05:00
vladimir.kuznetsov
2e5171c205 added matrix for all android arch 2022-11-29 00:55:32 +03:00
Shahzain Ali
a0b5491178 Merge branch 'qt_migration' into qmake-to-cmake-migration 2022-11-28 19:23:28 +05:00
vladimir.kuznetsov
fc8ef8678b Merge remote-tracking branch 'remotes/origin/qt_migration' into qmake-to-cmake-migration 2022-11-28 14:50:20 +03:00
Shahzain Ali
2dc1f2ea5b Setting minimum version to 13
QT 6.4 required minimum ios 13
https://doc.qt.io/qt-6/supported-platforms.html
2022-11-28 15:56:48 +05:00
Shahzain Ali
7999527582 Update README.md 2022-11-28 15:44:55 +05:00
Shahzain Ali
14be6506ee Qt5 to QT6 fixes. 2022-11-28 15:36:33 +05:00
vladimir.kuznetsov
c85ad470ba qt version in github actions changed to 6.4.1 2022-11-27 12:08:48 +03:00
vladimir.kuznetsov
8b6afcc5ec removed unused qzxing folder 2022-11-27 01:35:13 +03:00
vladimir.kuznetsov
813dced6df added qt6 modules installation to github actions 2022-11-27 01:30:36 +03:00
vladimir.kuznetsov
0a39866045 for github actions added step to build android application 2022-11-27 01:21:42 +03:00
vladimir.kuznetsov
48734689d8 for github actions added step to build macos and linux application 2022-11-27 01:21:41 +03:00
vladimir.kuznetsov
dfe927dcbd for github actions added step to build ios application 2022-11-27 01:21:41 +03:00
vladimir.kuznetsov
ca158def31 temporarily turned off the deployment of artifacts 2022-11-27 01:21:41 +03:00
vladimir.kuznetsov
409386336d for github actions added steps to build x32/x64 windows application 2022-11-27 01:21:41 +03:00
vladimir.kuznetsov
eeed6c3474 chore/revert link to dev qtkeychain submodule 2022-11-27 01:21:40 +03:00
pokamest
3296cd6c39 GH actions 12 2022-11-27 01:21:40 +03:00
pokamest
60e25d9c67 GH actions 11 2022-11-27 01:21:40 +03:00
pokamest
ec65e2025e GH actions 10 2022-11-27 01:21:39 +03:00
pokamest
f09020c3bc GH actions 9 2022-11-27 01:21:39 +03:00
pokamest
91baaed96d GH actions 8 2022-11-27 01:21:39 +03:00
pokamest
64de64ce33 GH actions 7 2022-11-27 01:21:38 +03:00
pokamest
b685e7008e GH actions 6 2022-11-27 01:21:38 +03:00
pokamest
375b3d776c GH actions 5 2022-11-27 01:21:38 +03:00
pokamest
c1fddd7164 GH actions 4 2022-11-27 01:21:37 +03:00
pokamest
3af9bf9e12 GH actions 3 2022-11-27 01:21:37 +03:00
pokamest
9ef5d0c144 GH actions 3 2022-11-27 01:21:37 +03:00
pokamest
3d1b37dc85 gh actions 2 2022-11-27 01:21:36 +03:00
pokamest
80ce8347f6 GH actions 1 2022-11-27 01:21:36 +03:00
vladimir.kuznetsov
3eb7e1392d feature/added cmake support for linux 2022-11-20 21:25:15 +03:00
vladimir.kuznetsov
ac78a44d74 fixed padding in build script 2022-11-18 17:06:52 +03:00
vladimir.kuznetsov
87fed9fde3 fixed connection with qssh 2022-11-18 16:42:22 +03:00
vladimir.kuznetsov
2564430046 build script now uses cmake, also:
- fixed linking qt6keychain and SortFilterProxyModel
- added translations
2022-11-15 23:31:55 +03:00
vladimir.kuznetsov
663861dc09 for debug target added deploy files required to run the application on Windows, also:
- added deploy additional files for android
- fixed include android libraries
2022-11-15 14:16:36 +03:00
vladimir.kuznetsov
2d6a12101e in CMakeLists source files are common for all platforms, now added via FILE(GLOB) 2022-11-14 22:22:38 +03:00
vladimir.kuznetsov
e40110fa4c added platform specific commands to cmake files 2022-11-12 23:52:15 +03:00
vladimir.kuznetsov
6ac162f3cd added cmake files for client project 2022-11-09 23:54:30 +03:00
vladimir.kuznetsov
aea1d16e31 added files for linux and mac to CMakeLists for server and wireguard-service projects 2022-11-08 21:32:17 +03:00
vladimir.kuznetsov
16e26ef215 added CMakeLists for server and wireguard-service projects 2022-11-07 23:59:09 +03:00
vladimir.kuznetsov
7270e701d4 hostname is now added to the server name for imported openvpn and wireguard configs 2022-11-05 19:40:51 +03:00
pokamest
c8010d4d52 Merge pull request #125 from amnezia-vpn/qt_migration-settings-btn
Added Settings button on Start Page
2022-11-05 16:42:24 +03:00
vladimir.kuznetsov
6941b7463e added display of wireguard configs, such a config will be displayed as raw text 2022-11-04 23:31:39 +03:00
vladimir.kuznetsov
99a6cd82b2 added import of configs in wireguard format 2022-11-03 23:39:58 +03:00
vladimir.kuznetsov
1a44307664 added protocol_defs for new config keywords 2022-11-01 23:24:58 +03:00
vladimir.kuznetsov
53d7a92a0d added import of configs in .ovpn format
- on the "OpenVPN Settings" page, such a config will be displayed as raw text
2022-11-01 23:12:42 +03:00
Hamza ARBI
4ba1f47423 Disable Servers settings item when no server has been set
Fix the logic of *Add Server* to comeback to start page instead of push when no server is set
2022-10-30 22:53:45 +01:00
Hamza ARBI
c38e47b726 Update SvgImageType icon color when the item is disabled 2022-10-30 02:06:51 +01:00
Hamza ARBI
e6a4d79b86 Add settings button on PageStart
Disable some items when no Server has been set
2022-10-30 02:06:20 +01:00
pokamest
b62d0697be Merge pull request #123 from amnezia-vpn/openvpn_addditional_configs
OpenVPN additional config
2022-10-26 17:02:13 +03:00
vladimir.kuznetsov
f90ebbbb4e added inclusion of an additional client/server config when generating configs from templates
- fixed name in additional server config field
2022-10-26 14:06:03 +03:00
Hamza ARBI
ab39802512 Using Basic theme in first place 2022-10-24 14:05:28 +01:00
Hamza ARBI
84da67adda Using Basic style in the first place 2022-10-24 13:56:12 +01:00
Hamza ARBI
cfff3c6d97 Used Universal Theme to fix QtQuick Controls 2022-10-24 13:50:41 +01:00
Hamza ARBI
cc3d9e0d2d Fix all QML headers and change the deprecated QML components
* QZXing : Error while integrating it
2022-10-20 20:09:17 +01:00
pokamest
442e7eb015 Merge branch 'dev' into qt_migration 2022-10-15 19:46:26 +03:00
pokamest
59248b7c2e Merge pull request #114 from outspace/dev
Set security screen for Android app
2022-09-23 23:41:42 +03:00
Mykola Baibuz
f2d7a45b74 Set security screen for Android app
This will guarantee that even apps running with root privileges are unable to directly capture information displayed by the app on the screen.
2022-09-23 22:03:28 +03:00
pokamest
c79b6147ea Merge pull request #113 from outspace/dev
Add auth protection for ssh key export (Android)
2022-09-22 21:15:35 +03:00
Mykola Baibuz
d93be76505 Add auth protection for ssh key export
We use a builtin keyguard for ssh key export protection on Android.

This protection works only if some protection is set on the phone.

https://developer.android.com/reference/android/app/KeyguardManager#isDeviceSecure()
2022-09-19 12:32:06 +03:00
pokamest
5fff65db5a Tiny fixes 2022-09-19 00:44:00 +03:00
pokamest
53e240add7 Android manifest fix 2022-09-12 14:57:00 +03:00
pokamest
9cfc65eeda Version bump 2022-09-11 00:24:43 +03:00
pokamest
47c305d557 Merge pull request #111 from amnezia-vpn/qrcodegen
qzxing removed, Qrcodegen added
2022-09-10 19:58:19 +03:00
pokamest
c5ba89b054 Code cleanup 2022-09-10 19:57:44 +03:00
pokamest
de8977723a Merge branch 'dev' into qrcodegen 2022-09-09 15:36:45 +03:00
pokamest
8cea93de94 Travis build fix 2022-09-09 15:34:09 +03:00
pokamest
e25cbe54d9 Merge branch 'dev' into qrcodegen 2022-09-09 15:02:14 +03:00
pokamest
b356522f94 Secure settings crash fix 2022-09-09 15:01:11 +03:00
pokamest
7a6c1de5d5 QrCoreGen 2022-09-07 09:51:03 +03:00
pokamest
fb07adf7c1 Travis fix 2022-09-05 02:06:58 +03:00
pokamest
9ceadd44c9 Travis fix 2022-09-05 01:56:39 +03:00
pokamest
e1c529ab91 Travis ccache 2022-09-05 01:38:29 +03:00
pokamest
ce27af6083 Travis build fix 2022-09-05 00:33:27 +03:00
pokamest
ac7d224645 Travis build fix 2022-09-05 00:11:55 +03:00
pokamest
df26f492a7 Travis build fix 2022-09-04 23:27:00 +03:00
pokamest
448c01ca99 Travis build fix 2022-09-04 14:49:33 +03:00
pokamest
bd7a9e5444 Merge pull request #106 from karolsteve/dev
Fix Android build on Travis
2022-09-04 14:15:54 +03:00
pokamest
1e717710b6 Merge pull request #109 from amnezia-vpn/Linux_deploy_script
Linux deploy script
2022-09-03 16:33:37 +03:00
pokamest
3cb14ad3bc Tiny Linux build scripts fixes 2022-09-03 06:31:59 -07:00
leetthewire
4769a67936 Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into Linux_deploy_script 2022-09-03 06:22:20 +04:00
leetthewire
279f866bf5 completed build linux script 2022-09-03 06:21:37 +04:00
leetthewire
5cbe7600a6 updated gitignore 2022-09-03 06:21:14 +04:00
pokamest
cdb1a4c288 Fix for AVP-01-006 - inscure app config permissions 2022-09-02 12:39:46 -07:00
pokamest
7d09d41a7d Merge pull request #108 from amnezia-vpn/dev
Release 2.1.0
2022-09-02 14:08:31 +03:00
pokamest
340bbd8727 Merge pull request #107 from amnezia-vpn/Linux_libs_deps
Linux libraries dependency for service
2022-09-01 18:03:18 +03:00
leetthewire
53c916ea4f Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into Linux_libs_deps 2022-09-01 17:45:39 +04:00
leetthewire
6451337274 fixed service lib path 2022-09-01 17:45:15 +04:00
pokamest
294b75ce2d QtKeyChain usage fix 2022-08-31 13:29:28 -07:00
pokamest
0ca4f3b104 Fix for CommandLineParser 2022-08-31 16:54:46 +03:00
pokamest
ac74510d47 Some fixes for Qt6 Android 2022-08-31 15:18:33 +03:00
pokamest
33ec69d33a Merge pull request #102 from omortie/qt_migration
migrated the codebase to Qt6 and fixed some compatibility issues
2022-08-31 13:53:55 +03:00
Steve Tchatchouang
f6d329ac48 Fix Android job CI 2022-08-30 14:00:40 +01:00
Steve Tchatchouang
a56fbeb611 Fix android build script
Using correct qt binaries folder (gcc64 -> Android)
2022-08-30 13:58:03 +01:00
Mortie
8c20a67cfa migrated the codebase to Qt6 and fixed some compatibility issues
* used a Qt6 ported version of SortFilterProxyModel
* used an updated Qt6 compatible version of QXZing
* added a flag to windows linker to avoid WinMain problem of MSVCRTD
* renamed utils.cpp to utilities.cpp for avoiding confusion with the same file name in SortFilterProxyModel
2022-08-29 12:21:09 +04:30
pokamest
fffa4fc031 Merge pull request #101 from amnezia-vpn/openvpn_random_mgmt_port
Openvpn random mgmt port [AVP-01-010]
2022-08-29 03:00:06 +03:00
pokamest
3316b73ab6 Select random management port 2022-08-29 02:58:23 +03:00
pokamest
211f7b7965 Merge pull request #100 from amnezia-vpn/check_openvpn_config
Check openvpn config for scripts [AVP-01-014]
2022-08-29 02:08:14 +03:00
pokamest
3a5a7bf674 Check openvpn config for scripts
QML refactoring
2022-08-29 01:32:42 +03:00
pokamest
7c749a964c Merge pull request #94 from amnezia-vpn/AVP-01-011
AVP-01-011 (Privileged process access list)
2022-08-27 19:21:45 +03:00
pokamest
997c8c87d0 Cleanup 2022-08-27 18:41:44 +03:00
pokamest
ed6a417d7e Merge branch 'dev' into AVP-01-011 2022-08-27 18:31:20 +03:00
pokamest
4a54f545a4 Merge pull request #99 from amnezia-vpn/qtkeychain
QtKeyChain module added [AVP-01-005, AVP-01-015]
2022-08-27 18:18:22 +03:00
pokamest
789902b79a Secure settings rework 2022-08-27 17:35:43 +03:00
pokamest
266859af19 Build fix for iOS 2022-08-26 03:19:34 -07:00
pokamest
9cca1a4819 Merge pull request #97 from amnezia-vpn/secure-config-2
App refactoring + secure config for mobile devices [AVP-01-005, AVP-01-015]
2022-08-26 01:02:12 +03:00
pokamest
aae1da3aa8 Cleanup code 2022-08-26 00:58:24 +03:00
pokamest
aed688224b App refactoring finished 2022-08-26 00:35:03 +03:00
pokamest
3ce1ec708d App refactoring finished 2022-08-25 17:35:28 +03:00
pokamest
510a564797 App refactoring 2022-08-25 12:47:02 +03:00
pokamest
b36517babb Merge branch 'dev' into secure-config-2 2022-08-24 20:40:10 +03:00
pokamest
415d18338e Secure config WIP 2022-08-24 18:51:35 +03:00
pokamest
14384131f4 Secure config WIP 2022-08-24 07:38:13 -07:00
pokamest
b3d54ce57e PageServerContainers animation fixed [ci skip] 2022-08-24 16:58:00 +03:00
pokamest
b5890340e3 Secure settings rework 2022-08-23 22:47:23 +03:00
pokamest
050d987d3b Merge branch 'dev' into qt_migration 2022-08-20 17:27:57 +03:00
pokamest
c4651cd915 Travis build fix 2022-08-20 17:24:11 +03:00
pokamest
b5f97c0d94 Travis build fix 2022-08-20 00:51:57 +03:00
pokamest
35165ba2b8 Travis build fix 2022-08-19 23:56:45 +03:00
pokamest
aeb1dcdf15 Travis build fix 2022-08-19 23:26:34 +03:00
pokamest
37730744e7 Travis build fix 2022-08-19 22:45:03 +03:00
pokamest
f821fe0356 Travis ios build 2022-08-19 22:23:52 +03:00
pokamest
ba16fdb548 Travis build fix 2022-08-19 18:47:39 +03:00
pokamest
144e6f59c8 Travis build fix 2022-08-19 18:35:17 +03:00
pokamest
2e42c5e875 Travis builds for Linux and Android 2022-08-19 16:17:37 +03:00
pokamest
eec8743e2f Travis ci fix 2022-08-18 19:57:46 +03:00
pokamest
e5e5684e2e Travis ci fix 2022-08-18 19:02:05 +03:00
pokamest
efddc6ccec Travis build fix 2022-08-18 17:01:34 +03:00
pokamest
5aef46733b Travis build fix 2022-08-18 15:31:10 +03:00
pokamest
201782184c Travis build fix 2022-08-18 15:20:27 +03:00
pokamest
5f2ef046e1 Travis build fix 2022-08-18 15:10:54 +03:00
pokamest
42398950e4 Fix for iOS 2022-08-16 08:28:41 -07:00
pokamest
506c8af1ea MacOS build script renamed 2022-08-16 03:37:46 -07:00
pokamest
70d9c516af Old MacOS build script deleted 2022-08-16 03:36:40 -07:00
pokamest
11ad86b9db Merge pull request #92 from amnezia-vpn/Linux_deploy_refactored
Linux deploy refactored
2022-08-16 13:08:30 +03:00
pokamest
2e9cfa6973 Merge pull request #93 from amnezia-vpn/Linux_install_scripts
Fixed installing scripts for Linux
2022-08-16 13:07:15 +03:00
pokamest
13e2c325e1 Merge pull request #95 from amnezia-vpn/easyrsa_cleanup
Cleanup easyrsa
2022-08-16 13:02:27 +03:00
pokamest
7e428a273f Merge pull request #91 from amnezia-vpn/Linux_errors_for_containers
Error descriptions for containers
2022-08-16 13:00:48 +03:00
pokamest
aa4bd516a9 Merge pull request #90 from amnezia-vpn/Linux_fix_sh_permissions
AVP-01-001 (Fix permissions for Linux and MacOS)
2022-08-15 23:27:44 +03:00
pokamest
82f8675b68 Merge pull request #96 from amnezia-vpn/android_7_wireguard_fix
Fix: infinite reconnect when using wireguard on Android 7 and 7.1
2022-08-15 23:17:39 +03:00
dimmdev
fdcb994e7a Fix: infinite reconnect when using wireguard on Android 7 and 7.1 2022-08-15 08:16:08 +05:00
pokamest
e89fa23533 Permissions fix for MacOS 2022-08-11 06:12:30 -07:00
pokamest
21d4f0f569 Cleanup easyrsa 2022-08-11 12:30:42 +03:00
pokamest
625201e559 Fix write permissions on macOS nac Linux 2022-08-11 12:29:09 +03:00
leetthewire
d36378fcbf fixed installing scripts 2022-08-11 01:23:57 +04:00
leetthewire
929ecfd42b linux deploy refactored 2022-08-11 01:20:27 +04:00
leetthewire
44496e424a errors for containers 2022-08-11 01:14:37 +04:00
leetthewire
1eb789e847 fixed permissions of a sh script 2022-08-11 00:58:07 +04:00
leetthewire
1ab76617df prepared to commit permissions of a sh script 2022-08-11 00:57:42 +04:00
pokamest
3bff653bbb IpcServerProcess permit list 2022-08-10 22:15:00 +03:00
pokamest
4b7a8c6d6e Start Qt6 migration 2022-08-10 14:00:04 +03:00
pokamest
9236be7fbd Merge pull request #70 from amnezia-vpn/android_shadowsocks
ShadowSocks implementation for Android
2022-08-09 17:12:36 +03:00
pokamest
fd9b922b21 Merge branch 'dev' into android_shadowsocks 2022-08-09 17:11:11 +03:00
pokamest
eea88f6e11 Cleanup 2022-08-09 17:06:03 +03:00
pokamest
eb47c968ae Build fix - MobileUtils.cpp 2022-08-08 19:46:39 +03:00
pokamest
560019b26c Build fix - typo in client.pro 2022-08-08 19:12:00 +03:00
pokamest
589e07f869 wireguard-tools submodule updated 2022-08-08 14:27:07 +03:00
pokamest
585de53148 Secure settings refactoring 2022-08-06 19:47:29 +03:00
pokamest
1e85b25438 Backup/restore config 2022-08-05 18:59:47 +03:00
pokamest
71b57bfed1 Secure settings 2 2022-08-05 14:31:12 +03:00
eugenyorbitsoftcom
870cb26e01 new line 2022-08-05 14:15:11 +06:00
eugenyorbitsoftcom
9a180b098f try read and write chipher Settings 2022-08-04 11:49:00 +06:00
eugenyorbitsoftcom
06682c333f remove kSecAttrService 2022-08-03 10:52:59 +06:00
eugenyorbitsoftcom
18c0aa5c81 kSecClassGenericPassword 2022-08-03 10:46:59 +06:00
eugenyorbitsoftcom
e49b468fd5 writeToKeychain, readFromKeychain 2022-08-02 15:52:03 +06:00
eugenyorbitsoftcom
7e5748b3a6 fix building project 2022-08-01 16:30:57 +06:00
eugenyorbitsoftcom
e99aa86863 fix building project 2022-08-01 15:57:16 +06:00
eugenyorbitsoftcom
bc6ae1d1b5 Merge branch 'dev' into secure-config 2022-08-01 10:55:33 +06:00
pokamest
df94a87a51 Merge pull request #83 from amnezia-vpn/open-config-in-app
iOS features : Open config in app, share configs
2022-07-31 23:40:08 +03:00
pokamest
9f7b2de311 Merge branch 'dev' into open-config-in-app 2022-07-31 23:39:11 +03:00
pokamest
dab6e10881 Wordpress site in the Tor network 2022-07-30 16:20:41 +03:00
eugenyorbitsoftcom
3b78c3a929 chiperSettings 2022-07-29 14:58:22 +06:00
eugenyorbitsoftcom
7029968c47 SecureFormat AES-GCM 2022-07-29 10:36:54 +06:00
pokamest
a8fe4e6aab Docker images fix: log driver=none 2022-07-27 17:34:43 +03:00
pokamest
b93dd8cb9b Build fix 2022-07-27 03:22:46 +03:00
ddd
0ba614961d fixed AVP-01-001 WP2, permissions on update-resolv-conf.sh 2022-07-16 13:23:17 +04:00
eugenyorbitsoftcom
79c56d440c fix LD_RUNPATH_SEARCH_PATHS 2022-07-14 13:01:40 +06:00
eugenyorbitsoftcom
9601506270 share file for iOS 2022-07-13 16:08:55 +06:00
eugenyorbitsoftcom
9ed16b81e8 read imported file configuration 2022-07-11 16:08:57 +06:00
eugenyorbitsoftcom
1800c1ff12 added ability import amnezia vpn config 2022-07-11 11:06:01 +06:00
pokamest
a8067bee36 Merge pull request #78 from amnezia-vpn/ios-wireguard
Ios wireguard fix and version bump
2022-07-07 16:31:19 +03:00
Alex Kh
f879663033 Applied fix from spamming button issue solution, bumped app version, and build number 2022-07-07 17:26:40 +04:00
eugenyorbitsoftcom
d618af19d6 fix crash 2022-07-07 17:16:45 +04:00
Alex Kh
8aa61bf5bc Bump version 2022-07-06 23:17:02 +04:00
pokamest
cd70f4b1c9 Merge pull request #53 from amnezia-vpn/ios-wireguard
iOS initial support
2022-07-06 16:26:50 +03:00
pokamest
240e55029b Merge pull request #77 from amnezia-vpn/qr-code-native-ios
Qr code reader native for iOS
2022-07-06 16:23:19 +03:00
eugenyorbitsoftcom
9aabe7c72e QRCodeReader for iOS 2022-07-06 14:02:56 +06:00
eugenyorbitsoftcom
6744dce57e QRCodeReader (WIP) 2022-07-06 11:51:45 +06:00
Alex Kh
d38e40d53f Latest updates before starting anew 2 2022-06-30 21:10:43 +04:00
Alex Kh
aa1b561bc0 Latest updates before starting anew 2022-06-30 21:10:34 +04:00
pokamest
6674b7890c Merge pull request #71 from AlexKLWS/improve-build-process
Improve build process for iOS
2022-06-30 17:57:35 +03:00
pokamest
a3a62165e9 Merge pull request #73 from amnezia-vpn/linux_v2
Linux v2
2022-06-29 21:47:22 +03:00
pokamest
8eb5a62737 Disable QUERY_ALL_PACKAGES manifest for Android 2022-06-26 15:01:04 +03:00
pokamest
c5ef462937 v. 2.0.10 2022-06-11 15:52:44 +03:00
Pokamest Nikak
eca397b45f Docker fixes - FROM alpine:3.15 2022-06-10 16:19:29 +03:00
unknown
9f7a583c92 local path fix 2022-06-04 13:20:59 +03:00
leetthewire
a59077b94f cleaned up 2022-05-11 22:54:55 +00:00
leetthewire
d61bfaa993 Merge branch 'dev' of https://github.com/amnezia-vpn/desktop-client into linux_v2 2022-05-11 22:49:50 +00:00
leetthewire
a17690f88b linux data folder updated 2022-05-11 22:10:54 +00:00
leetthewire
271e948c1f clean up /platform/linux/ folder 2022-05-11 22:05:00 +00:00
leetthewire
ac7de6213a clean up /platform/linux/ folder 2022-05-11 22:04:01 +00:00
Alex Korzh
7ff6b64742 Replace die with killProcess in apple_compile 2022-04-29 18:02:38 +04:00
Alex Korzh
531e0ad19d Update README 2022-04-29 13:44:46 +04:00
Alex Korzh
cc7112fb66 Reduce path to non-homebrew path 2022-04-28 16:58:47 +04:00
Alex Korzh
cf08af31ac Ensure Tun2Socks go deps are installed and up to date with latest go 2022-04-28 16:32:38 +04:00
Alex Korzh
1fdcf3877e Remove unused xcode_patcher 2022-04-28 14:56:19 +04:00
Alex Korzh
0fadf035db Add potential go PATH to config build settings 2022-04-28 14:55:58 +04:00
Alex Korzh
58b1c4b511 Update xcode patcher to use WireGuardKitGo folder for iOS project 2022-04-28 14:08:28 +04:00
Alex Korzh
0cc8feac57 Improve Tun2Socks error message 2022-04-28 14:05:30 +04:00
Alex Korzh
ba1efd57a5 Create and use version file from WireGuardKitGo on iOS for consistency 2022-04-28 14:05:14 +04:00
aman
29656fb9a6 Shadowsocks protocol added 2022-04-26 23:49:20 +05:30
Alex Korzh
92d79ebeea Clean up comments 2022-04-24 19:40:02 +04:00
Alex Korzh
3a69107eac Clean up apple compile script 2022-04-24 19:37:56 +04:00
Alex Korzh
4bfb528526 Kill prepare process if any of steps failed 2022-04-24 19:25:43 +04:00
Alex Korzh
fe9dd1d014 Rename ios_compile to apple_compile since it could be used for macOS 2022-04-24 17:32:21 +04:00
Grigory Dobrov
4829c8b314 Merge branch 'fix_inf_windows' into dev 2022-04-17 08:33:46 +03:00
aman
59b4bf5267 Shadowsocks added as a library folder in android 2022-04-16 20:18:27 +05:30
leetthewire
c19f34570d first build 2022-04-14 16:41:39 -07:00
Grigory Dobrov
94d29796b8 fixed line endings for windows drivers *.inf files 2022-04-13 00:45:19 +03:00
leetthewire
e9f44ffcc6 maked first build 2022-04-02 08:02:27 -07:00
leetthewire
a261ab4f0c editing linux sources 2022-04-02 07:31:54 -07:00
aman
929bcf03a0 Android shadowsocks code added 2022-04-01 10:05:58 +05:30
pokamest
a6a69ab1b6 cert updated 2022-03-26 23:15:29 +03:00
leetthewire
39de79d3cd started to file updating for linux build 2022-03-25 12:32:36 -07:00
leetthewire
40ab540179 Merge branch 'dev' of https://github.com/amnezia-vpn/desktop-client into linux_v2 2022-03-22 03:41:29 -07:00
leetthewire
7d7b6f4475 prepared to build 2022-03-22 03:40:47 -07:00
aman
ccdd433e35 Shadowsocks open source code added 2022-03-17 11:38:48 +05:30
aman
4a6ea38ef8 so files for shadowsocks added 2022-03-16 00:41:45 +05:30
Alex Kh
b20e25f052 Move frameworks from extemsion to host app 2022-02-23 18:57:06 +04:00
Alex Kh
8591d4e96c Merge remote-tracking branch 'origin/dev' into ios-wireguard 2022-02-23 18:51:25 +04:00
pokamest
912051637a Android manifest fix, IPC refactoring 2022-02-22 02:08:57 +03:00
pokamest
c233f767f4 Multiple ui fixes, save file function reimpl 2022-02-15 17:08:55 +03:00
Alex Kh
e1293c2c74 Merge remote-tracking branch 'origin/dev' into ios-wireguard 2022-02-15 10:55:45 +04:00
aman
b63bf2465f Android service issue fixed - VPN is keep running when connected and ui closed 2022-02-13 22:52:04 +05:30
pokamest
505c9c6218 Various fixes 2022-02-09 15:23:20 +03:00
pokamest
14350240eb Merge branch 'dev' 2022-02-07 08:42:52 +03:00
pokamest
cb21991efa DNS container fix, Cloak binaries updated 2022-02-05 18:02:49 +03:00
pokamest
49e58c25f2 Installer version bump 2022-02-05 16:08:53 +03:00
pokamest
ac6000a2ae Svg icons, dns ui fix 2022-02-05 15:52:14 +03:00
pokamest
6d1c9edc24 Log panel added 2022-02-04 17:49:48 +03:00
pokamest
1a7fa3746d DNS service fixes for all containers 2022-02-02 02:12:29 +03:00
pokamest
f7a57ffeb4 Cloak container arm support, ss updated 2022-02-02 01:52:37 +03:00
pokamest
ad9d45a154 Dns selection implemented 2022-02-01 19:48:59 +03:00
pokamest
5fffb2afe3 Dns container to internal network 2022-01-31 16:08:22 +03:00
pokamest
1269114074 Cleanup berfore uninstall, post-uninstall refactoring 2022-01-31 00:10:51 +03:00
pokamest
d24f6ae064 Logs functions fixes 2022-01-30 17:35:57 +03:00
pokamest
95fe09489c Vpn and wizard pages fixes 2022-01-28 16:03:21 +03:00
pokamest
1a144da36d SFTP fixes for Macos 2022-01-24 14:29:37 -08:00
pokamest
8e26da1759 Macos build fixes 2022-01-23 15:25:53 -08:00
pokamest
daf53226c3 SFTP fixes 2022-01-24 02:01:56 +03:00
pokamest
2b9e615e51 Various fixes 2022-01-23 19:16:40 +03:00
pokamest
02acbecef5 Re-resolve sites after VPN Connected 2022-01-22 20:00:06 +03:00
pokamest
8f28964ce2 Tiny ui fixes 2022-01-22 18:19:57 +03:00
pokamest
495e74e2f0 Sites page fix 2022-01-22 18:19:38 +03:00
Alex Kh
543bd1a777 Merge remote-tracking branch 'origin/dev' into ios-wireguard 2022-01-06 21:08:50 +04:00
pokamest
8f23970ccc Gradle build bump 2022-01-04 17:12:32 +03:00
pokamest
9ec39658fe DNS container with EmerCoin DNS support 2022-01-03 18:30:53 +03:00
Alex Kh
7c0518843f ShadowSocks disabled for production while in debug/testing mode 2021-12-31 11:04:01 +04:00
Alex Kh
7131257354 missing files added 2021-12-31 10:58:36 +04:00
Alex Kh
db527be97c VPN over Shadowsocks, three providers added, still unstable (testing, not for production) 2021-12-31 10:57:58 +04:00
Alex Kh
7c46e42820 Merge remote-tracking branch 'origin/dev' into ios-wireguard 2021-12-31 10:56:40 +04:00
pokamest
9943e081d9 RegExp validators fix 2021-12-25 23:01:53 +03:00
pokamest
68a51c9c63 WireGuard protocol fix 2021-12-25 21:14:55 +03:00
Alex Kh
6a98cdf974 Insert assets on project generation stage, add static versioning (makes sense on project regeneration) 2021-12-23 15:38:02 +04:00
Alex Kh
9ca8c66c47 Tried to get rid of crashes on sequential vpn turn on/off 2021-12-23 13:13:55 +04:00
Alex Kh
56754d616b Added fastlane scripts, old ids cleaned up 2021-12-22 17:38:17 +04:00
pokamest
e7dd964825 ServerController fix 2021-12-22 13:41:09 +03:00
Alex Kh
39e348948c Merge conflicts in .gitmodules resolved 2021-12-21 23:21:10 +04:00
Alex Kh
6583090d4f [WIP] shadowsocks implementation added 2021-12-21 23:17:22 +04:00
pokamest
f20134415e IKEv2 class file renamed 2021-12-21 02:57:23 +03:00
pokamest
bd9b9600c1 Release 2.0.6 2021-12-21 00:35:18 +03:00
pokamest
5ae9873455 Destructor crash fix 2021-12-20 15:43:36 +03:00
pokamest
5776ca0384 Merge pull request #47 from amnezia-vpn/qr_rework
Qr rework
2021-12-20 03:23:48 +03:00
pokamest
f8f4b39965 qzxing submodule 2021-12-20 02:42:16 +03:00
pokamest
1d51419a11 QR codes rework 2021-12-20 02:29:23 +03:00
pokamest
5e1ca0c19f iOS icons asset 2021-12-16 11:54:07 -08:00
pokamest
b341224c92 AppStore icon fix 2021-12-16 15:04:59 +03:00
pokamest
3861f23af3 iOS icon fixed 2021-12-16 14:45:08 +03:00
pokamest
e7beff79d0 iOS icons 2021-12-16 14:38:41 +03:00
pokamest
2380875cbf Merge branch 'ios-wireguard' into dev 2021-12-15 06:06:08 -08:00
pokamest
343e6a50df resetIpStack added 2021-12-15 14:53:07 +03:00
pokamest
5aa47d35e7 Version to main screen 2021-12-14 12:50:57 +03:00
Alex Kh
40996888c9 [WIP] shadowsocks implementation prepare 2021-12-13 11:47:09 +04:00
pokamest
313ceed1d0 StartPageLogic fix 2021-12-12 14:42:25 +03:00
pokamest
ac07d62344 ui fixes 2021-12-11 14:44:24 +03:00
pokamest
2db1bbae4b WireGuard server script fix 2021-12-10 15:43:43 +03:00
Alex Kh
090e50e936 [WIP] protocol switching and relaunch crash issues (possibly) fixed 2021-12-09 12:59:56 +04:00
Alex Kh
b6bab0c723 [WIP] seamless protocol switching without leaving the app 2021-12-08 19:40:43 +04:00
Alex Kh
1a333f7968 [WIP] move connection state call to main thread 2021-12-08 17:10:15 +04:00
Alex Kh
87c00b3804 Merge branch 'ios-wireguard' of https://github.com/amnezia-vpn/desktop-client into ios-wireguard 2021-12-08 15:57:16 +04:00
Alex Kh
eba71469a4 [WIP] OpenVPN tunnel implementation 2021-12-08 15:55:36 +04:00
pokamest
4eef127744 VPN modes ui fix 2021-12-04 19:48:47 +03:00
pokamest
4c2941acf0 Merge pull request #45 from amnezia-vpn/ios-wireguard
Ios wireguard
2021-12-04 16:27:46 +03:00
pokamest
40791a9cd4 Merge branch 'dev' into ios-wireguard 2021-12-04 05:24:11 -08:00
pokamest
4d374581b5 isWorkingOnPlatform function added 2021-12-04 16:13:34 +03:00
Alex Kh
4976dc3a4c Added missing parameters for init and connect 2021-12-01 20:02:54 +04:00
pokamest
9e0fd7d51e iOS build fixes 2021-11-30 12:53:12 -08:00
pokamest
bf8b3c3b2f Merge branch 'dev' into ios-wireguard 2021-11-30 21:51:06 +03:00
Alex Kh
38336fdb02 Removed build folders from being tracked 2021-11-30 17:13:00 +04:00
Alex Kh
7c7f77adc6 [WIP] Added wireguard, prepare to test and debug 2021-11-30 16:56:24 +04:00
pokamest
d28a2ebc57 NotificationHandler systemtray 2021-11-28 17:28:25 +03:00
pokamest
67d413956d AndroidController reimpl 2021-11-26 17:43:02 +03:00
pokamest
e644575bc5 Merge branch 'dev' into ios_main 2021-11-22 03:41:38 -08:00
pokamest
0291ba8cb5 Server add fix 2021-11-22 14:40:23 +03:00
pokamest
622a390b23 Windows deploy fixed 2021-11-22 14:34:33 +03:00
pokamest
2e92705f9c build fix 2021-11-22 01:42:16 -08:00
pokamest
c6548afa1b Merge branch 'dev' into ios_main 2021-11-22 00:08:34 -08:00
pokamest
9e7deecb99 Version 2.0.1 2021-11-19 23:04:35 +03:00
pokamest
2773d7598b VPN connection routine fixed 2021-11-19 19:02:39 +03:00
pokamest
a9165aba25 VPN page fixes, TFTP page fix 2021-11-19 13:57:00 +03:00
pokamest
fd9d54d2dd Merge branch 'dev' into ios_main 2021-11-18 03:48:34 -08:00
pokamest
dde04ff979 IKEv2 fixes
TOR fixes
tray fix
2021-11-18 01:40:28 +03:00
pokamest
e0f42f4a0a ProtocolsModel bug fixes 2021-11-17 23:42:17 +03:00
pokamest
3a49d5fdc4 Tray fix 2021-11-17 20:24:45 +03:00
pokamest
9dee7bb7e7 UI fixes, VPN page fixes 2021-11-17 15:01:48 +03:00
pokamest
25428c9165 Share WireGuard page
Share IKEv2 page
2021-11-15 18:17:28 +03:00
pokamest
c6efc5b212 Share page fixes 2021-11-13 17:20:23 +03:00
pokamest
836075de10 Share pages refactoring 2021-11-13 16:09:08 +03:00
pokamest
396af917b5 Share page reimpl 2021-11-08 15:18:52 +03:00
pokamest
a89104127a Share page refactoring part 1 2021-11-06 13:47:52 +03:00
pokamest
ed26706ee7 WireguardConfigurator fix 2021-11-02 21:50:28 +03:00
pokamest
9de89e5544 qml ui fixws: ss and cloak 2021-10-28 15:31:54 +03:00
pokamest
d7f672ab0a ui fixes 2021-10-28 00:04:54 +03:00
pokamest
b124aabf69 Merge pull request #38 from amnezia-vpn/wireguard_embedded
change wireguard vpn protocol implementation on Windows from wg.exe t…
2021-10-27 01:32:42 +03:00
pokamest
6c07a583f8 Wireguard configurator fixed 2021-10-27 00:42:25 +03:00
pokamest
83256de752 Merge branch 'dev' into wireguard_embedded 2021-10-26 22:50:52 +03:00
pokamest
44f4d083bf VPN connection moved to separate thread 2021-10-26 12:59:20 +03:00
pokamest
1b1a5be607 Merge branch 'dev' into ikev2_fix_window_api_signal 2021-10-26 00:02:14 +03:00
Pavel Malyutin
6b93f79d2e dockerfiles: Added support of Shadowsocks for aarch64 2021-10-25 17:13:46 +03:00
pokamest
1ce26b3ada Merge pull request #43 from boscogh/master
dockerfiles: Added support of Shadowsocks for aarch64
2021-10-25 16:37:39 +03:00
DiepDTN
70f18151dd clean up thread and timer, now run Ikev2Protocol::setConnectionState() directly from WinAPI callback 2021-10-25 14:54:57 +07:00
alexkosh
4de38a295c Fix wireguard config 2021-10-23 23:06:50 +03:00
pokamest
7701efc704 iOS Wireguard 2021-10-23 04:26:47 -07:00
pokamest
421f665e85 Tiny fixes 2021-10-22 01:07:20 +03:00
pokamest
ca233be127 QML ui fixes 2021-10-21 19:49:53 +03:00
pokamest
377bac67be QML ui fixes 2021-10-21 18:10:28 +03:00
pokamest
1f97dd0111 Android splash 2021-10-21 15:04:09 +03:00
pokamest
f1fa22f4cf Android icon added 2021-10-21 14:45:08 +03:00
pokamest
a998dc21b0 WG configurator fix 2021-10-20 18:43:51 +03:00
pokamest
a0dbbfa04e Android libs fix 2021-10-20 17:37:54 +03:00
Pavel Malyutin
e7092ae769 dockerfiles: Added support of Shadowsocks for aarch64 2021-10-20 10:26:33 +00:00
pokamest
dd148b92c6 Merge pull request #41 from amnezia-vpn/feature/android-openvpn-protocol
Feature/android openvpn protocol
2021-10-18 19:07:30 +03:00
pokamest
65d110eb0a OpenSSL for ASndroid added 2021-10-18 18:49:15 +03:00
pokamest
78dec77c3c Merge branch 'dev' into feature/android-openvpn-protocol 2021-10-18 17:52:02 +03:00
Розов Никита Валерьевич
7723568cef adding dns addresses in route table for samsung devices 2021-10-18 17:01:55 +03:00
Розов Никита Валерьевич
ebfd50f30d add socket protect 2021-10-18 16:51:45 +03:00
pokamest
e571c1f95c botan dlls removed 2021-10-18 15:22:23 +03:00
pokamest
1b0e5e01fa Merge branch 'easyrsa_remove' into dev 2021-10-18 15:19:18 +03:00
pokamest
a426591282 iOS build fixes 2021-10-18 05:11:50 -07:00
pokamest
499ff590cd botan for IPhone added 2021-10-17 23:17:38 +03:00
pokamest
03aae3f787 OpenSSL lib for MacOS 2021-10-17 08:00:52 -07:00
pokamest
ca25e257ef OpenSSL libs added for Linux 2021-10-17 07:00:00 -07:00
pokamest
6e9c43c37b OpenVpnConfigurator fix 2021-10-17 06:43:30 -07:00
pokamest
1db253f1fd OpenVpnConfigurator fix 2021-10-17 16:41:16 +03:00
pokamest
67a55fee25 Easyrsa removed
Cert req reimplemented
OpenSSL libs added for Windows
2021-10-17 13:03:03 +03:00
Розов Никита Валерьевич
0f89c40a1d add tun reroute gw function 2021-10-16 19:25:07 +03:00
pokamest
64627abe6d OpenVPN libs added for Android 2021-10-16 18:33:18 +03:00
Розов Никита Валерьевич
5895b37a06 parcing config fix 2021-10-14 14:53:20 +03:00
pokamest
5292d294be OpenVpnConfigurator fix 2021-10-14 12:01:14 +03:00
Розов Никита Валерьевич
258d2c9ce3 update openvpn archive 2021-10-14 11:38:08 +03:00
Розов Никита Валерьевич
b5cc515e42 added swig files and libs to the project 2021-10-14 11:32:17 +03:00
Розов Никита Валерьевич
88d5e9cbc3 disconnection fix 2021-10-14 11:22:59 +03:00
Розов Никита Валерьевич
6a9cc9bf37 openvpn connection status fix 2021-10-14 10:14:01 +03:00
pokamest
cc7cee6d44 ikev2 test fix 3 2021-10-13 22:07:31 +03:00
pokamest
990db5967a ikev2 test2 2021-10-13 19:43:37 +03:00
Розов Никита Валерьевич
28ae7eeaee add disable openvpnconnection, refactoring 2021-10-13 18:33:43 +03:00
pokamest
ba8755a6d4 Merge branch 'dev' into wireguard_embedded 2021-10-13 16:57:03 +03:00
pokamest
b4007038fb ikev2 winapi test solution 2021-10-13 15:46:00 +03:00
pokamest
8c679a08c4 openvpn config export fix 2021-10-13 14:40:43 +03:00
Розов Никита Валерьевич
6c2e6ead2b fix merge conflicts 2021-10-11 16:54:20 +03:00
Розов Никита Валерьевич
f4a55d60a4 Merge branch 'dev' into feature/android-openvpn-protocol 2021-10-11 15:37:17 +03:00
Розов Никита Валерьевич
ab1e31b2ff openvpn connection logic fix 2021-10-11 15:36:40 +03:00
Розов Никита Валерьевич
1ceee8901e add openvpn connection logic draft 2021-10-09 20:17:19 +03:00
DiepDTN
6042317552 change wireguard vpn protocol implementation on Windows from wg.exe to wireguard windows embeddable-dll-service 2021-10-08 07:44:19 +07:00
pokamest
d275702080 Add protocol name to json connection config 2021-10-08 00:50:26 +03:00
pokamest
344d23bad1 Fix for android 2021-10-07 22:52:13 +03:00
pokamest
ba85b56e9f Various fixes 2021-10-07 22:21:04 +03:00
pokamest
64e5e02744 ikev2 impl for windows 2021-10-07 22:20:45 +03:00
Розов Никита Валерьевич
8084b2764a add return statement in android_vpnprotocol::start() 2021-10-07 18:53:37 +03:00
Розов Никита Валерьевич
c057786011 openvpn protocol linked to the project 2021-10-06 22:45:25 +03:00
Розов Никита Валерьевич
9e0e66a0ae add return statement in android_vpnprotocol::start() 2021-10-06 21:06:27 +03:00
pokamest
0168bfa67a remove unnecarry ui files 2021-10-05 14:59:52 +03:00
pokamest
d4b9557508 Refactoring 2021-10-05 12:22:13 +03:00
pokamest
9ecb703b99 refactoring 2021-10-04 21:13:07 +03:00
pokamest
fa151cd320 Ikev2 support 2021-10-04 19:07:49 +03:00
pokamest
a5bcf1a02d VPN configuration class fixes 2021-10-02 21:56:47 +03:00
pokamest
535e628eba Embded compiled WireGuard lib for Android 2021-10-02 15:09:20 +03:00
pokamest
edbfcda197 Fixes for android and wg 2021-10-01 12:18:48 -07:00
pokamest
b8e35ed66c Added missing file for wireguard for android 2021-10-01 12:03:40 +03:00
pokamest
c548db513a android fix 2021-10-01 03:01:48 +03:00
pokamest
476aabe671 android fix - libwg-go added 2021-09-30 21:09:48 +03:00
pokamest
969fc899a0 Android service fix 2021-09-30 19:44:26 +03:00
pokamest
b61d89d01b android fix 2021-09-30 18:56:49 +03:00
pokamest
bac7b3ab37 Android service wireguard build 2021-09-30 18:16:41 +03:00
pokamest
133a3e67d2 android .pro fix 2021-09-30 16:06:35 +03:00
pokamest
eb497be730 Native android service implemented 2021-09-30 15:56:48 +03:00
pokamest
d553d7f772 cloak container fix 2021-09-28 02:36:38 +03:00
pokamest
5932db24e1 refactoring 2021-09-28 02:19:52 +03:00
pokamest
ddca4f9068 Software verion 2.0.0
Билд выпущен при поддержке Теплицы социальных технологий
2021-09-24 14:01:53 +03:00
pokamest
b244158b95 website in tor network container improved
Sponsored by "Теплица социальных технологий", 2021
В рамках работы над задачами по хакатону 2021
2021-09-24 13:14:35 +03:00
pokamest
3bcc12869b Поддержка протокола Sftp (File Sharing) по ТЗ по гранту от Теплицы
социальных технологий (2021 год)
+ небольшой рефакторинг
2021-09-22 14:49:08 +03:00
pokamest
6ee203a21d Merge branch 'tor_site_container' into teplitsa_tz
Containers page refactoring
2021-09-21 01:49:28 +03:00
pokamest
157d7c4f23 Various types containers support 2021-09-20 21:51:28 +03:00
pokamest
0d9f1ba95b qml ui fixes 2021-09-19 14:31:38 +03:00
pokamest
a390f2e988 Qml Containers Page refact 2021-09-16 19:49:50 +03:00
pokamest
0faf6c8599 QML ServerContainers page refact 2021-09-16 16:19:14 +03:00
pokamest
9ae2e3fba2 ios fixes 2021-09-15 08:03:28 -07:00
pokamest
12b079df65 qml refactoring 2021-09-14 00:39:07 +03:00
pokamest
e920d9cdf3 esc and back button support 2021-09-13 17:36:48 +03:00
Pokamest Nikak
542f363e92 ServerContainers qml ui started to fix 2021-09-10 22:19:00 +03:00
Pokamest Nikak
40fa2d6779 NewServerSettings qml rework 2021-09-09 20:15:44 +03:00
Pokamest Nikak
3175bc1e48 QML Fixes 2021-09-08 21:24:09 +03:00
Pokamest Nikak
62262a3572 BackButton.qml added 2021-09-08 15:09:16 +03:00
Pokamest Nikak
6516a84986 refact fixes 2021-09-08 14:23:02 +03:00
Pokamest Nikak
16e887dcf0 AUTO_PROPERTY finished 2021-09-08 13:52:36 +03:00
Pokamest Nikak
63ffa4a212 AUTO_PROPERTY added 2021-09-07 22:11:43 +03:00
Pokamest Nikak
539bf2ee24 VpnLogic 2021-09-07 21:01:56 +03:00
Pokamest Nikak
deaeda59d0 ServerContainersLogic 2021-09-07 19:26:58 +03:00
Pokamest Nikak
4c0ff29488 NewServerConfiguringLogic
NewServerProtocolsLogic
2021-09-07 18:06:05 +03:00
pokamest
7c28fe2795 NewServerConfiguringLogic
NewServerProtocolsLogic
2021-09-07 11:48:25 +03:00
pokamest
deda2e158e ShadowSocksLogic
CloakLogic
2021-09-06 14:35:57 +03:00
pokamest
a6e5cfff8a OpenVpnLogic added 2021-09-06 13:41:45 +03:00
pokamest
d1ea625435 codestyle fixes 2021-09-06 12:39:46 +03:00
pokamest
ea551ab0a0 qml ui protocols separated 2021-09-06 12:30:26 +03:00
pokamest
d9ae10f5bc qml ui fixes 2021-09-06 12:29:56 +03:00
pokamest
d90211ef48 Wizard Logic added
TODO_REFACTs fixed
2021-09-06 11:44:03 +03:00
Pokamest Nikak
ace304914e share page refact 2 2021-09-04 15:21:36 +03:00
Pokamest Nikak
6dc13b2c00 start page refact 2021-09-04 12:53:58 +03:00
Pokamest Nikak
ca3617aa7d refact sharing 2021-09-04 11:26:16 +03:00
Pokamest Nikak
84ca7e8879 refact 2 2021-09-03 22:15:05 +03:00
Pokamest Nikak
135b96a280 QML gui refact started 2021-09-03 20:17:13 +03:00
pokamest
febf9cfafb Merge branch 'dev' into gui_qml 2021-08-19 01:51:02 +03:00
pokamest
27171ed974 qml ui fixes 2021-08-19 01:27:22 +03:00
pokamest
2c346fdc08 Merge pull request #33 from amnezia-vpn/Linux_fix_dirs_rsa_2
Linux bug fixes
2021-08-17 14:25:23 +03:00
leetthewire
229265cdd9 updated 2021-08-15 11:48:31 -07:00
pokamest
57234bc793 qml ui fixes 2021-08-13 18:40:03 +03:00
pokamest
d496d0cccd Botan linux fix 2021-08-13 07:04:11 -07:00
Ngoc Diep
c687bb39ef fix PageSites table error 2021-08-09 01:34:25 +07:00
Ngoc Diep
d1a3545912 port UI Logic to QML 2021-08-09 00:41:52 +07:00
pokamest
accdedfead botan build fix 2021-08-08 18:34:05 +03:00
pokamest
bedf669ca4 Botan switched to amalgamation build 2021-08-08 18:10:09 +03:00
pokamest
a9dc1b0603 Merge pull request #31 from amnezia-vpn/Linux_build_stable_2
updated linux build
2021-08-06 17:45:49 +03:00
leetthewire
9997fa8f3e updated linux build 2021-08-04 10:08:00 -07:00
pokamest
26524dd93a Merge pull request #29 from amnezia-vpn/update_botan_3
Update botan (final)
2021-08-03 17:34:26 +03:00
pokamest
bd586a1921 Botan for MacOS added 2021-08-03 07:32:04 -07:00
pokamest
dec04ccd06 Add botan for linux static lib 2021-08-03 06:36:03 -07:00
pokamest
64d4e96068 Add botan for linux 2021-08-03 06:34:37 -07:00
pokamest
6d83e16aa7 Android build config added 2021-08-01 19:57:04 +03:00
Ngoc Diep
8d36c31cb4 implement qml UI 2021-07-28 16:13:29 +07:00
pokamest
a49db653a1 botan.pri fix 2021-07-27 13:35:10 +03:00
pokamest
cd7884b508 Botan deploy fix (Windows x64) 2021-07-27 13:23:18 +03:00
pokamest
5bf2c1d6e1 Botan updated
QtSsh updated to https://github.com/sandsmark/QSsh
2021-07-27 09:33:49 +03:00
pokamest
08b2824ff0 tor site 2021-07-23 12:42:08 +03:00
pokamest
1baf36282e win32 deploy fix 2021-06-27 13:26:06 +03:00
pokamest
e45c7507f9 Merge pull request #22 from amnezia-vpn/linux_ui_fix
fixed UI for linux
2021-06-26 20:49:48 +03:00
leetthewire
148b1dacce fixed UI for linux
Signed-off-by: leetthewire <yaartjom@mail.ru>
2021-06-26 23:09:48 +00:00
pokamest
b8b0ffb626 Merge pull request #21 from amnezia-vpn/dev
Release 1.8.1
2021-06-24 16:48:50 +03:00
leetthewire
d17906c2a6 Service: Fixed bug with permanent addresses on interface (#20)
Windows Service: Fixed bug with permanent addresses on interface
2021-06-19 16:41:16 +03:00
pokamest
b1f7baa79f Various bug fixes 2021-06-19 16:38:35 +03:00
pokamest
973cbd83d9 Update README.md 2021-06-18 23:19:44 +03:00
pokamest
a599ed6e24 Update README.md 2021-06-18 23:19:07 +03:00
pokamest
a1cbf8824f Readme fix 2021-06-18 19:18:50 +03:00
pokamest
52450ef2f5 Release 1.8 2021-06-17 01:04:09 +03:00
pokamest
69170940c9 Merge pull request #19 from amnezia-vpn/cloak_ss_2
ShadowSocks over cloak
2021-06-17 00:53:48 +03:00
pokamest
e89caaee52 bump version 1.7.6 2021-06-17 00:51:15 +03:00
pokamest
0b3535ff13 hide wireguard settings 2021-06-16 22:40:34 +03:00
pokamest
e7a22ad159 Export shadowsocks over cloak config support 2021-06-16 22:25:08 +03:00
pokamest
74a517d985 Windows server 2012 support 2021-06-16 22:24:33 +03:00
pokamest
d57e56de70 Setup container more debugging 2021-06-16 22:24:13 +03:00
pokamest
e2f8f77adf Revert "Added threads suspend, Edited suspendWcmSvc() func for Windows. Based on old SuspendProcess func."
This reverts commit 999087337e.
2021-06-16 20:09:49 +03:00
pokamest
db543b62ba Macos build fix 2021-06-14 03:48:46 -07:00
Sike
999087337e Added threads suspend, Edited suspendWcmSvc() func for Windows. Based on old SuspendProcess func. 2021-06-14 02:34:21 +06:00
pokamest
6788f0b7eb Wireguard deploy files 2021-06-12 12:02:46 +03:00
pokamest
2f6fb0d557 Wireguard protocol + refactoring 2021-06-12 11:59:36 +03:00
pokamest
8bdfe1741a Win Routes fix 2021-06-10 17:58:28 +03:00
pokamest
739781ece3 Saving files before refreshing line endings 2021-06-06 17:27:58 +03:00
pokamest
7e74b95976 Readme updated 2021-06-06 16:25:22 +03:00
pokamest
531695bd0b Windows x32 deploy files added 2021-06-06 16:18:01 +03:00
pokamest
dd959e7b26 Custom routing fixes 2021-06-05 20:55:57 +03:00
pokamest
c4235a60c8 Macos fixes 2021-06-05 01:18:28 -07:00
pokamest
f75456060f build fix 2021-06-03 10:42:58 -07:00
pokamest
623aae3718 Macos build fix 2021-06-03 10:34:28 -07:00
pokamest
974832f7d9 Tiny fix 2021-06-03 20:27:46 +03:00
pokamest
d13df65bfb Tiny fixes 2021-06-03 20:23:44 +03:00
pokamest
80ada3f241 Travis fix 2021-06-03 00:29:51 +03:00
pokamest
aad3677d45 Travis fix 2021-06-02 22:34:29 +03:00
pokamest
8892d3c5d9 Travis fix 2021-06-02 21:35:44 +03:00
pokamest
da08bef2f9 Travis fix 2021-06-02 20:46:59 +03:00
pokamest
d79483e967 Travis fix 2021-06-02 20:25:00 +03:00
pokamest
906391f786 Travis fix 2021-06-02 19:24:50 +03:00
pokamest
48a4aa399b Travis fix 2021-06-02 19:05:26 +03:00
pokamest
a8dd319a9d Travis fix 2021-06-02 18:54:39 +03:00
pokamest
815686cba6 Travis fix 2021-06-02 18:41:08 +03:00
pokamest
7232a14926 Travis fix 2021-06-02 17:56:01 +03:00
pokamest
dd526959eb easyrsa fix 2021-06-02 17:51:04 +03:00
pokamest
fe6f89c551 travis fix 2021-06-02 01:32:25 +03:00
pokamest
16c754e004 Disable openvpn log append 2021-06-02 00:54:47 +03:00
pokamest
8792a8673a gitignore fix 2021-06-02 00:53:44 +03:00
pokamest
9376df8703 deploy fixes 2021-06-02 00:49:42 +03:00
pokamest
435ee58d40 Macos fix: routes delete 2021-06-01 08:45:26 -07:00
pokamest
9dbe15a0e3 custom sitet pre release 2021-06-01 18:18:09 +03:00
pokamest
34b97bdc24 Macos fixes for route functions 2021-05-27 15:01:15 -07:00
pokamest
6c74f30d79 Custom sites reimplemented 2021-05-27 22:18:36 +03:00
pokamest
97e918ae72 ui fixes 2021-05-22 16:14:26 +03:00
pokamest
d0c66a693b macos deploy script fixes 2021-05-21 05:33:40 -07:00
pokamest
0ea085cc02 - Crash fix if service not connected
- import fix
- disabled share button for readonly server
2021-05-20 15:59:58 +03:00
pokamest
7fd13faa59 cloak stop() fixed 2021-05-19 00:26:36 +03:00
pokamest
d4c0e519d9 ui fixes 2021-05-19 00:15:40 +03:00
pokamest
4ba964db47 win7 support fixes
wizard added
2021-05-18 15:50:52 +03:00
pokamest
45e5ec76dd Windows 7 tap support improved 2021-05-14 23:30:13 +03:00
pokamest
df27003998 win build fix 2021-05-14 23:29:09 +03:00
pokamest
9002568474 Macos cached config fix 2021-05-14 04:27:30 -07:00
pokamest
5c5411261a macos dns setup fixed 2021-05-13 08:23:56 -07:00
pokamest
acf878c8dd Macos route add reimplemented using system call 2021-05-13 08:20:38 -07:00
pokamest
491a09b175 macos autostart fix 2021-05-12 13:07:22 -07:00
pokamest
51f7e6811e macos ui fix 2021-05-12 02:49:36 -07:00
pokamest
eee6b8b10f main.cpp default font removed 2021-05-11 12:15:33 -07:00
pokamest
dc4a1c6eca macos fix 2021-05-11 09:36:43 -07:00
pokamest
02810ff844 bug fixes 2021-05-11 17:04:04 +03:00
pokamest
1bb2ef9e30 ui fixes 2021-05-10 20:51:38 +03:00
pokamest
df2a6dc278 cloak for macos fixed 2021-05-10 05:25:20 -07:00
pokamest
835f767c3f import/export fixes 2021-05-10 14:19:36 +03:00
pokamest
e3fb239de9 Config export 2021-05-10 02:33:31 +03:00
pokamest
de67f244da Multiprotocol support 2021-05-07 23:28:37 +03:00
pokamest
d424bb24cf refactoring
Protocol to DockerContainer
2021-04-26 23:19:19 +03:00
pokamest
615bba69e5 refactoring 2021-04-26 22:54:31 +03:00
pokamest
7bba7a9eab cygwin grep added 2021-04-20 02:11:14 +03:00
pokamest
a5e9cea22f Release 1.6 WIP 2021-04-20 02:09:47 +03:00
pokamest
f9affb083b Macos route delete fix 2021-04-19 14:34:47 +03:00
pokamest
85b6b06cc9 - no dockerhub
- trafic masking
2021-04-04 23:12:36 +03:00
pokamest
059c6404ab gitignore updated 2021-04-04 23:09:31 +03:00
pokamest
0d989a7fae meta version updated 2021-04-04 23:08:01 +03:00
pokamest
7dfc002316 cloak exe added 2021-04-04 23:06:54 +03:00
pokamest
8d8d392e84 cygwin updated to x64 2021-04-04 23:04:31 +03:00
pokamest
c6e75d5f86 server script fixes 2021-03-25 23:26:59 +03:00
pokamest
99bfd56ef4 minor release 1.5.3 2021-03-19 15:03:44 +03:00
pokamest
c2f6c7d939 route delete fixed (Windows) 2021-03-18 22:13:05 +03:00
pokamest
d831d68e73 ShadowSocks protocol fixes:
- remote for OpenVPN is set to real ip address
- remote ip will be added as alias in docker container
- ss-local graceful shutdown
- crash fixes
2021-03-18 18:45:08 +03:00
pokamest
84e4b776ac openvpn target host is 10.8.0.1 via ss route 2021-03-17 03:47:33 +03:00
pokamest
f9e1b2c6dc QR code lib added
ShadowSocks export
ui stylesheet fixes
ip:port regexp fixed
dns settings reset bug fixed
2021-03-17 03:45:38 +03:00
pokamest
54fca5bebc cygpcre-1.dll added 2021-03-16 22:15:27 +03:00
pokamest
c5ce417d79 macos close button fix 2021-03-14 12:52:19 -07:00
pokamest
6765142ebc ssh key auth fix 2021-03-14 12:51:52 -07:00
pokamest
ca898a6759 Ssh key auth support added
yum/apt install support
2021-03-14 21:19:11 +03:00
pokamest
a2bb382652 ShadowSocks password - sha256 2021-03-13 14:16:24 +03:00
pokamest
02f966bc67 Win7 fix
Connection import fix
2021-03-13 13:56:52 +03:00
pokamest
65acdc8c09 readme added 2021-03-09 18:48:59 +03:00
pokamest
407ea77a9e ssh connection strict check disabled 2021-03-09 18:45:41 +03:00
pokamest
3e4a9f54a7 cygwin binaries added 2021-03-09 18:44:45 +03:00
pokamest
6b77bd5f13 Server install fix 2021-03-08 18:17:50 +03:00
pokamest
fb6de25e5f Migrate to cygwin sh 2021-03-06 15:07:43 +03:00
pokamest
ffbe5107e2 Secondary instance fix 2021-03-06 14:59:55 +03:00
pokamest
40a5b2e3f3 sites list ui fix 2021-02-25 23:11:46 +03:00
pokamest
c683884868 sites list reimplement 2021-02-25 21:16:00 +03:00
pokamest
65961d8d2e vpnconnection.cpp crash fix
ss server sript fix
2021-02-25 18:05:42 +03:00
pokamest
7dc1f1e225 Utils ip address regexp 2021-02-25 18:03:24 +03:00
pokamest
a47ab15aef mainwindow.ui fix 2021-02-25 01:06:02 +03:00
pokamest
c74efdaa9b ui fix for macos 2021-02-24 13:41:32 -08:00
pokamest
39224c7bf7 SingleApplication 2021-02-24 13:38:23 -08:00
pokamest
96aa3d409d SingleApplication 2021-02-24 23:40:57 +03:00
pokamest
c63990f720 Auto start
Auto connect
Dns settings
ui fixes
2021-02-24 21:58:32 +03:00
pokamest
ad643bf76e new icon 2021-02-22 18:07:39 +03:00
pokamest
c7ea4966fd minor fixes:
-build_windows.bat
-win build fix
-qdebug fix
2021-02-22 16:31:43 +03:00
pokamest
8fd81be477 ShadowSocks fixes for MacOS 2021-02-21 09:44:53 -08:00
pokamest
a1cb4ac544 Custom routing done
ShadowSocks enabled by default
2021-02-18 15:00:41 +03:00
pokamest
f91854594c Merge branch 'dev' into service_refact 2021-02-11 19:17:16 +03:00
pokamest
f661ea1d46 Merge branch 'macos_build_fix' into dev 2021-02-10 10:44:37 -08:00
pokamest
f50eea3eaf macos signing fixes 2021-02-10 06:57:26 -08:00
pokamest
c15b57e690 windows travis fix 2021-02-10 00:07:12 +03:00
pokamest
5f7ef31345 win cert updated 2021-02-09 00:33:26 +03:00
pokamest
447410a27a Macos build fix (#6)
macos deploy fixes
2021-02-08 23:57:35 +03:00
pokamest
2aa9f9cca9 macos build fix 2021-02-08 12:42:48 -08:00
pokamest
cba27d354d macos deploy fixes 2021-02-08 21:10:34 +03:00
pokamest
b398f42ada ipc process fix 2021-02-03 20:05:50 +03:00
pokamest
b6571d99de Qt ro refact 2021-02-03 15:42:36 +03:00
pokamest
b2392c1943 Qt Remote objects done 2021-02-02 22:51:31 +03:00
pokamest
048a673d31 Qt remote objects IPC 2021-02-02 01:47:40 +03:00
pokamest
c4df9c004b Merge branch 'dev' into service_refact 2021-01-30 15:03:01 +03:00
pokamest
b9d4c53eb6 travis macos fix 2021-01-28 14:18:28 +03:00
pokamest
5fdeea0581 travis fix 2021-01-28 13:26:43 +03:00
pokamest
e1cd764050 travis fix 2021-01-28 13:11:10 +03:00
pokamest
1e54379cc0 macos travis fix 2021-01-28 12:54:09 +03:00
pokamest
ba3f69d206 travis fix 2021-01-27 01:44:32 +03:00
pokamest
fcfd4181c7 merge fix 2021-01-27 01:32:36 +03:00
pokamest
ca05e64f35 travis fix 2021-01-27 01:18:09 +03:00
pokamest
9f6ec6d3e2 Merge branch 'master' into gitfix 2021-01-27 00:50:55 +03:00
pokamest
2e50aae603 macos deploy 2021-01-26 22:15:49 +03:00
pokamest
5a16a07b57 travis release 2021-01-26 22:00:58 +03:00
pokamest
953eca6695 Bug fixes:
- auto install tap
- share connectionState
- service crash fix
2021-01-26 15:01:15 +03:00
pokamest
a50cdd5bc2 travis fix 2021-01-23 16:45:11 +03:00
pokamest
10eb65e545 travis fix 2021-01-23 16:28:06 +03:00
pokamest
5354344ba7 travis fix 2021-01-23 16:02:21 +03:00
pokamest
c000a93eef travis fix 2021-01-23 15:13:46 +03:00
pokamest
ef6bc5ae4a travis fix 2021-01-23 15:08:01 +03:00
pokamest
97c4564649 travis fix 2021-01-23 15:03:56 +03:00
pokamest
5bf31a8b50 travis fix 2021-01-23 01:09:27 +03:00
pokamest
18e0d7fb2c travis fix 2021-01-23 00:57:12 +03:00
pokamest
ac454d9d78 Server scripts fix 2021-01-22 16:06:43 +03:00
pokamest
806677510f icon changed 2021-01-21 19:16:10 +03:00
pokamest
68e0ba9923 server scripts fix 2021-01-21 19:14:07 +03:00
pokamest
22b33a4f25 remote_obj 2021-01-20 23:07:23 +03:00
pokamest
77f830acd5 travis fix 2021-01-19 09:48:50 +03:00
pokamest
eb3b090257 travis fix 2021-01-19 01:58:55 +03:00
pokamest
2e1c219093 travis fix 2021-01-19 01:54:42 +03:00
pokamest
e38f69caf0 travis fix 2021-01-19 01:54:27 +03:00
pokamest
795f286923 travis fix 2021-01-19 01:45:47 +03:00
pokamest
d62e5b51da travis fix 2021-01-19 01:44:17 +03:00
pokamest
96b267b1f7 travis fix 2021-01-19 01:31:59 +03:00
pokamest
568388367e travis fix 2021-01-19 01:18:23 +03:00
pokamest
5ca46edf33 travis fix 2021-01-19 01:15:05 +03:00
pokamest
af41abd346 travis fix 2021-01-19 01:09:41 +03:00
pokamest
5edb61641c travis fix 2021-01-19 00:27:35 +03:00
pokamest
af3b1caa87 travis fix 2021-01-18 22:30:32 +03:00
pokamest
cc4a7b32b0 travis fix 2021-01-18 22:07:31 +03:00
pokamest
dfd61f58d4 travis fix 2021-01-18 21:58:23 +03:00
pokamest
84a3c1f725 travis fix 2021-01-18 19:00:18 +03:00
pokamest
2419fa1a6e travis fix 2021-01-18 18:45:38 +03:00
pokamest
3b8ecd9e9d travis windows fix 2021-01-18 01:41:20 +03:00
pokamest
94ee4b76db travis fix 2021-01-18 01:18:22 +03:00
pokamest
d43a1cd753 travis fix 2021-01-18 01:14:04 +03:00
pokamest
8bc6852b39 travis fix 2021-01-17 16:27:33 +03:00
pokamest
3850be08f1 travis fix 2021-01-17 16:22:05 +03:00
pokamest
d72d1d56b1 travis fix 2021-01-17 16:15:52 +03:00
pokamest
2a4926843c travis fix 2021-01-17 14:14:26 +03:00
pokamest
1b357055a2 travis fix 2021-01-17 13:53:05 +03:00
pokamest
2d3d64e462 travis fix 2021-01-17 13:17:37 +03:00
pokamest
aa648d4e12 travis scripts 2021-01-17 13:11:39 +03:00
pokamest
bfa0ac4c34 Macos doc icon 2021-01-16 21:04:16 +03:00
pokamest
c37ddd83d5 ui fix 2021-01-16 15:08:27 +03:00
pokamest
96bbc1cdbc ss fix 2021-01-15 23:37:34 +03:00
pokamest
ec9ae0ef4f shadowsocks impl 2021-01-15 23:36:35 +03:00
pokamest
95cbb07cbb Merge branch 'dev' into ss/impl 2021-01-12 12:57:58 +03:00
pokamest
7b95d6a5fc ss files 2021-01-11 23:19:30 +03:00
driftingsun
bea19a9461 Fix issue with easyrsa 2021-01-11 16:41:17 +03:00
pokamest
ba686556d2 Merge branch 'dev' into ss/impl 2021-01-10 20:52:04 +03:00
pokamest
15dc6eaaf8 ss files 2021-01-10 20:37:57 +03:00
driftingsun
3369a387ce Fix crash on fatal error, remove moc files from Windows installation 2021-01-10 18:47:29 +03:00
michael
dd46d8cf99 Fix some warnings, fix installation scripts (macOS) 2021-01-10 16:50:38 +03:00
pokamest
0b8c8835c4 new server page fix 2021-01-09 20:05:16 +03:00
pokamest
441811e277 Refactoring
Ui improvements
Bug fixes
2021-01-09 19:55:16 +03:00
pokamest
3645735053 easyrsa scripts for MacOS 2021-01-08 18:10:52 +03:00
pokamest
416d597847 MacOS deploy script fix 2021-01-08 18:08:20 +03:00
pokamest
861c71e3a8 OpenVpn runtime error codes handling 2021-01-08 16:51:58 +03:00
pokamest
f45fb442de Scripts fix for macos 2021-01-08 15:43:45 +03:00
pokamest
82241701a9 deploy fix 2021-01-08 00:34:15 +03:00
pokamest
bfdbe27a8d Openvpn scripts fixes
some refactoring
2021-01-07 20:53:42 +03:00
pokamest
c7dafe9c00 Crash fix in management server 2021-01-07 19:10:24 +03:00
2936 changed files with 467445 additions and 94948 deletions

6
.gitattributes vendored Normal file
View File

@@ -0,0 +1,6 @@
deploy/data/windows/x64/tap/windows_7/OemVista.inf eol=crlf
deploy/data/windows/x64/tap/windows_10/OemVista.inf eol=crlf
deploy/data/windows/x32/tap/windows_7/OemVista.inf eol=crlf
deploy/data/windows/x32/tap/windows_10/OemVista.inf eol=crlf
client/3rd/* linguist-vendored
client/android/gradlew.bat eol=crlf

42
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,42 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Log files**
Attach log files to help explain your problem.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Windows 10]
- Version [e.g. 2.1.2]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Version [e.g. 2.1.2]
**Server (please complete the following information):**
- OS: [e.g. Ubuntu 22.04]
**Additional context**
Add any other context about the problem here.

424
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,424 @@
name: 'Deploy workflow'
on:
push:
branches:
- '**'
env:
QT_MIRROR: https://mirrors.ocf.berkeley.edu/qt/ # https://download.qt.io/static/mirrorlist/
jobs:
Build-Linux-Ubuntu:
name: 'Build-Linux-Ubuntu'
runs-on: ubuntu-20.04
env:
QT_VERSION: 6.5.1
QIF_VERSION: 4.6
steps:
- name: 'Install Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
modules: 'qtremoteobjects qt5compat qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
tools: 'tools_ifw'
set-env: 'true'
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Get sources'
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 10
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Build project'
run: |
sudo apt-get install libxkbcommon-x11-0
export QT_BIN_DIR=${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/gcc_64/bin
export QIF_BIN_DIR=${{ runner.temp }}/Qt/Tools/QtInstallerFramework/${{ env.QIF_VERSION }}/bin
bash deploy/build_linux.sh
- name: 'Pack installer'
run: cd deploy && tar -cf AmneziaVPN_Linux_Installer.tar AmneziaVPN_Linux_Installer.bin
- name: 'Upload installer artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_Linux_installer.tar
path: deploy/AmneziaVPN_Linux_Installer.tar
retention-days: 7
- name: 'Upload unpacked artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_Linux_unpacked
path: deploy/AppDir
retention-days: 7
# ------------------------------------------------------
Build-Windows:
name: Build-Windows
runs-on: windows-latest
env:
QT_VERSION: 6.5.1
QIF_VERSION: 4.6
BUILD_ARCH: 64
steps:
- name: 'Get sources'
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 10
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Install Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
modules: 'qtremoteobjects qt5compat qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
tools: 'tools_ifw'
set-env: 'true'
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Setup mvsc'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: 'x64'
- name: 'Build project'
shell: cmd
run: |
set BUILD_ARCH=${{ env.BUILD_ARCH }}
set QT_BIN_DIR="${{ runner.temp }}\\Qt\\${{ env.QT_VERSION }}\\msvc2019_64\\bin"
set QIF_BIN_DIR="${{ runner.temp }}\\Qt\\Tools\\QtInstallerFramework\\${{ env.QIF_VERSION }}\\bin"
call deploy\\build_windows.bat
- name: 'Upload installer artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_Windows_installer
path: AmneziaVPN_x${{ env.BUILD_ARCH }}.exe
retention-days: 7
- name: 'Upload unpacked artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_Windows_unpacked
path: deploy\\build_${{ env.BUILD_ARCH }}\\client\\Release
retention-days: 7
# ------------------------------------------------------
Build-iOS:
name: 'Build-iOS'
runs-on: macos-12
env:
QT_VERSION: 6.5.2
steps:
- name: 'Setup xcode'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.2'
- name: 'Install desktop Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'mac'
target: 'desktop'
modules: 'qtremoteobjects qt5compat qtshadertools qtmultimedia'
arch: 'clang_64'
dir: ${{ runner.temp }}
set-env: 'true'
extra: '--base ${{ env.QT_MIRROR }}'
- name: 'Install iOS Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'mac'
target: 'ios'
modules: 'qtremoteobjects qt5compat qtshadertools qtmultimedia'
dir: ${{ runner.temp }}
setup-python: 'true'
set-env: 'true'
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Install go'
uses: actions/setup-go@v3
- name: 'Setup gomobile'
run: |
export PATH=$PATH:~/go/bin
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
- name: 'Get sources'
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 10
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Install dependencies'
run: pip install jsonschema jinja2
- name: 'Build project'
run: |
git submodule update --init --recursive
export QT_BIN_DIR="${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/ios/bin"
export QT_MACOS_ROOT_DIR="${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/macos"
export PATH=$PATH:~/go/bin
sh deploy/build_ios.sh
env:
IOS_TRUST_CERT_BASE64: ${{ secrets.IOS_TRUST_CERT_BASE64 }}
IOS_SIGNING_CERT_BASE64: ${{ secrets.IOS_SIGNING_CERT_BASE64 }}
IOS_SIGNING_CERT_PASSWORD: ${{ secrets.IOS_SIGNING_CERT_PASSWORD }}
APPSTORE_CONNECT_KEY_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ID }}
APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }}
APPSTORE_CONNECT_PRIVATE_KEY: ${{ secrets.APPSTORE_CONNECT_PRIVATE_KEY }}
IOS_APP_PROVISIONING_PROFILE: ${{ secrets.IOS_APP_PROVISIONING_PROFILE }}
IOS_NE_PROVISIONING_PROFILE: ${{ secrets.IOS_NE_PROVISIONING_PROFILE }}
# - name: 'Upload appstore .ipa and dSYMs to artifacts'
# uses: actions/upload-artifact@v4
# with:
# name: app-store ipa & dsyms
# path: |
# ${{ github.workspace }}/AmneziaVPN-iOS.ipa
# ${{ github.workspace }}/*.app.dSYM.zip
# retention-days: 7
# ------------------------------------------------------
Build-MacOS:
name: 'Build-MacOS'
runs-on: macos-latest
env:
# Keep compat with MacOS 10.15 aka Catalina by Qt 6.4
QT_VERSION: 6.4.3
QIF_VERSION: 4.6
steps:
- name: 'Setup xcode'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.4'
- name: 'Install Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'mac'
target: 'desktop'
arch: 'clang_64'
modules: 'qtremoteobjects qt5compat qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
tools: 'tools_ifw'
set-env: 'true'
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Get sources'
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 10
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Build project'
run: |
export QT_BIN_DIR="${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/macos/bin"
export QIF_BIN_DIR="${{ runner.temp }}/Qt/Tools/QtInstallerFramework/${{ env.QIF_VERSION }}/bin"
bash deploy/build_macos.sh
- name: 'Upload installer artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_MacOS_installer
path: AmneziaVPN.dmg
retention-days: 7
- name: 'Upload unpacked artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_MacOS_unpacked
path: deploy/build/client/AmneziaVPN.app
retention-days: 7
# ------------------------------------------------------
Build-Android:
name: 'Build-Android'
runs-on: ubuntu-latest
env:
ANDROID_BUILD_PLATFORM: android-34
QT_VERSION: 6.6.1
QT_MODULES: 'qtremoteobjects qt5compat qtimageformats qtshadertools'
steps:
- name: 'Install desktop Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
modules: ${{ env.QT_MODULES }}
dir: ${{ runner.temp }}
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Install android_x86_64 Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_x86_64'
modules: ${{ env.QT_MODULES }}
dir: ${{ runner.temp }}
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Install android_x86 Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_x86'
modules: ${{ env.QT_MODULES }}
dir: ${{ runner.temp }}
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Install android_armv7 Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_armv7'
modules: ${{ env.QT_MODULES }}
dir: ${{ runner.temp }}
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Install android_arm64_v8a Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_arm64_v8a'
modules: ${{ env.QT_MODULES }}
dir: ${{ runner.temp }}
extra: '--external 7z --base ${{ env.QT_MIRROR }}'
- name: 'Grant execute permission for qt-cmake'
shell: bash
run: |
chmod +x ${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/android_x86_64/bin/qt-cmake
- name: 'Get sources'
uses: actions/checkout@v3
with:
submodules: 'true'
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Setup Java'
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: 'Setup Android NDK'
id: setup-ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: 'r26b'
- name: 'Decode keystore secret to file'
env:
KEYSTORE_BASE64: ${{ secrets.ANDROID_RELEASE_KEYSTORE_BASE64 }}
shell: bash
run: |
echo $KEYSTORE_BASE64 | base64 --decode > android.keystore
- name: 'Build project'
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
QT_HOST_PATH: ${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/gcc_64
ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/android.keystore
ANDROID_KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_ALIAS }}
ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_PASS }}
shell: bash
run: ./deploy/build_android.sh --aab --apk all --build-platform ${{ env.ANDROID_BUILD_PLATFORM }}
- name: 'Upload x86_64 apk'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN-android-x86_64
path: deploy/build/AmneziaVPN-x86_64-release.apk
compression-level: 0
retention-days: 7
- name: 'Upload x86 apk'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN-android-x86
path: deploy/build/AmneziaVPN-x86-release.apk
compression-level: 0
retention-days: 7
- name: 'Upload arm64-v8a apk'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN-android-arm64-v8a
path: deploy/build/AmneziaVPN-arm64-v8a-release.apk
compression-level: 0
retention-days: 7
- name: 'Upload armeabi-v7a apk'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN-android-armeabi-v7a
path: deploy/build/AmneziaVPN-armeabi-v7a-release.apk
compression-level: 0
retention-days: 7
- name: 'Upload aab'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN-android
path: deploy/build/AmneziaVPN-release.aab
compression-level: 0
retention-days: 7

142
.github/workflows/tag-deploy.yml vendored Normal file
View File

@@ -0,0 +1,142 @@
name: 'Release deploy workflow'
on:
workflow_dispatch:
# push:
# tags:
# - **
jobs:
Build-Android-Release:
name: 'Build-Android-Release'
runs-on: ubuntu-latest
env:
QT_VERSION: 6.4.1
QIF_VERSION: 4.5
steps:
- name: 'Install desktop Qt'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
modules: 'qtremoteobjects qt5compat qtimageformats qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
set-env: 'true'
extra: '--external 7z'
- name: 'Install android Qt x86_64'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_x86_64'
modules: 'qtremoteobjects qt5compat qtimageformats qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
set-env: 'true'
extra: '--external 7z'
- name: 'Install android Qt x86'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_x86'
modules: 'qtremoteobjects qt5compat qtimageformats qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
set-env: 'true'
extra: '--external 7z'
- name: 'Install android Qt arm_v7'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_armv7'
modules: 'qtremoteobjects qt5compat qtimageformats qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
set-env: 'true'
extra: '--external 7z'
- name: 'Install android Qt arm_v8'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'android'
arch: 'android_arm64_v8a'
modules: 'qtremoteobjects qt5compat qtimageformats qtshadertools'
dir: ${{ runner.temp }}
setup-python: 'true'
set-env: 'true'
extra: '--external 7z'
- name: 'Get sources'
uses: actions/checkout@v3
with:
path: main
submodules: 'true'
fetch-depth: 10
- name: 'Preparations before keystore fetching'
run: |
mkdir keystore
- name: 'Getting keystore'
uses: actions/checkout@v3
with:
repository: amnezia-vpn/amnezia-android-certificates
ssh-key: ${{ secrets.ANDROID_CERTS_SSH_PRIVATE_KEY }}
path: keystore
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Setup Java'
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: 'Build project'
run: |
export QT_HOST_PATH="${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/gcc_64"
export NDK_VERSION=23c
export ANDROID_NDK_PLATFORM=android-23
export ANDROID_NDK_HOME=${{ runner.temp }}/android-ndk-r${NDK_VERSION}
export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME
if [ ! -f $ANDROID_NDK_ROOT/ndk-build ]; then
wget https://dl.google.com/android/repository/android-ndk-r${NDK_VERSION}-linux.zip -qO ${{ runner.temp }}/ndk.zip &&
unzip -q -d ${{ runner.temp }} ${{ runner.temp }}/ndk.zip ;
fi
export QT_BIN_DIR=${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/android_arm64_v8a/bin
cd main
bash deploy/build_android.sh
- name: 'Signing APK'
run: |
pwd
ANDROID_BUILD_TOOLS_VERSION=30.0.3
${ANDROID_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}/zipalign -f -v 4 AmneziaVPN-release-unsigned.apk AmneziaVPN-release-aligned.apk
${ANDROID_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}/apksigner sign --out AmneziaVPN-release-signed.apk --ks keystore/debug.keystore --ks-key-alias ${{ secrets.DEBUG_ANDROID_KEYSTORE_KEY_ALIAS }} --ks-pass pass:${{secrets.DEBUG_ANDROID_KEYSTOTE_KEY_PASS }} AmneziaVPN-release-aligned.apk
- name: 'Upload'
uses: actions/upload-artifact@v3
with:
name: Release APK
path: ${{ runner.temp }}/main/AmneziaVPN-release-signed.apk

64
.github/workflows/tag-upload.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: 'Upload a new version'
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
jobs:
upload:
runs-on: ubuntu-latest
name: upload
steps:
- name: Checkout CMakeLists.txt
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
sparse-checkout: |
CMakeLists.txt
sparse-checkout-cone-mode: false
- name: Verify git tag
run: |
GIT_TAG=${{ github.ref_name }}
CMAKE_TAG=$(grep 'project.*VERSION' CMakeLists.txt | sed -E 's/.* ([0-9]+.[0-9]+.[0-9]+.[0-9]+)$/\1/')
if [[ "$GIT_TAG" == "$CMAKE_TAG" ]]; then
echo "Git tag ($GIT_TAG) and version in CMakeLists.txt ($CMAKE_TAG) are the same. Continuing..."
else
echo "Git tag ($GIT_TAG) and version in CMakeLists.txt ($CMAKE_TAG) are not the same! Cancelling..."
exit 1
fi
- name: Download artifacts from the "${{ github.ref_name }}" tag
uses: robinraju/release-downloader@v1.8
with:
tag: ${{ github.ref_name }}
fileName: "AmneziaVPN_(Linux_|)${{ github.ref_name }}*"
out-file-path: ${{ github.ref_name }}
- name: Upload beta version
uses: jakejarvis/s3-sync-action@master
if: contains(github.event.base_ref, 'dev')
with:
args: --include "AmneziaVPN*" --delete
env:
AWS_S3_BUCKET: updates
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
AWS_S3_ENDPOINT: https://${{ vars.CF_ACCOUNT_ID }}.r2.cloudflarestorage.com
SOURCE_DIR: ${{ github.ref_name }}
DEST_DIR: beta/${{ github.ref_name }}
- name: Upload stable version
uses: jakejarvis/s3-sync-action@master
if: contains(github.event.base_ref, 'master')
with:
args: --include "AmneziaVPN*" --delete
env:
AWS_S3_BUCKET: updates
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
AWS_S3_ENDPOINT: https://${{ vars.CF_ACCOUNT_ID }}.r2.cloudflarestorage.com
SOURCE_DIR: ${{ github.ref_name }}
DEST_DIR: stable/${{ github.ref_name }}

93
.gitignore vendored
View File

@@ -3,8 +3,13 @@
macOSPackage/
AmneziaVPN.dmg
AmneziaVPN.exe
AmneziaVPN_*.exe
deploy/build/*
winbuild.bat
deploy/build_32/*
deploy/build_64/*
winbuild*.bat
.cache/
# Qt-es
/.qmake.cache
@@ -19,7 +24,39 @@ qrc_*.cpp
ui_*.h
Makefile*
*build-*
compile_commands.json
# fastlane
client/fastlane/report.xml
client/fastlane/build/*
# Qt-es
client/Release-iphoneos/
client/Debug-iphoneos/
client/.xcode/
client/.qmake.cache
client/.qmake.stash
client/*.pro.user
client/*.pro.user.*
client/*.qbs.user
client/*.qbs.user.*
client/*.moc
client/moc_*.cpp
client/qrc_*.cpp
client/ui_*.h
client/ui_*.cpp
client/Makefile*
client/fastlane/build/
client/*build-*
client/AmneziaVPN.xcodeproj
client/Debug-iphonesimulator/
client/amneziavpn_plugin_import.cpp
client/amneziavpn_qml_plugin_import.cpp
client/qmlcache_loader.cpp
client/rep_ipc_interface_replica.h
client/resources_qmlcache.qrc
client/3rd/OpenVPNAdpter/build/
client/3rd/ShadowSocks/build/
# QtCreator
*.autosave
@@ -31,12 +68,66 @@ Makefile*
# QtCtreator CMake
CMakeLists.txt.user*
# Linux files
*.7z
deploy/AppDir
deploy/Tools
deploy/AmneziaVPN*Installer*
# MACOS files
.DS_Store
client/.DS_Store
._.DS_Store
._*
*.dmg
# tmp files
*.*~
######################### Android
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Android Profiling
*.hprof
client/3rd/ShadowSocks/ss_ios.xcconfig
# UML generated pics
out/

View File

@@ -1,27 +0,0 @@
variables:
GIT_STRATEGY: clone
stages:
- build
build-windows:
stage: build
tags:
- windows
script:
- cmd.exe /k "deploy\windows-env.bat && cd deploy && windows.bat"
artifacts:
name: artifacts-windows
paths:
- AmneziaVPN.exe
build-macos:
stage: build
tags:
- macos
script:
- cd deploy && ./macos.sh
artifacts:
name: artifacts-macos
paths:
- AmneziaVPN.dmg

30
.gitmodules vendored
View File

@@ -1,3 +1,27 @@
[submodule "3rd/QtSsh"]
path = 3rd/QtSsh
url = https://github.com/amnezia-vpn/QtSsh.git
[submodule "client/3rd/OpenVPNAdapter"]
path = client/3rd/OpenVPNAdapter
url = https://github.com/amnezia-vpn/OpenVPNAdapter.git
[submodule "client/3rd/ShadowPath"]
path = client/3rd/ShadowPath
url = https://github.com/qman9501/ShadowPath
[submodule "client/3rd/outline-go-tun2socks"]
path = client/3rd/outline-go-tun2socks
url = https://github.com/Jigsaw-Code/outline-go-tun2socks.git
[submodule "client/3rd/CocoaAsyncSocket"]
path = client/3rd/CocoaAsyncSocket
url = https://github.com/robbiehanson/CocoaAsyncSocket.git
[submodule "client/3rd/CocoaLumberjack"]
path = client/3rd/CocoaLumberjack
url = https://github.com/CocoaLumberjack/CocoaLumberjack.git
[submodule "client/3rd/qtkeychain"]
path = client/3rd/qtkeychain
url = https://github.com/frankosterfeld/qtkeychain.git
[submodule "client/3rd/SortFilterProxyModel"]
path = client/3rd/SortFilterProxyModel
url = https://github.com/mitchcurtis/SortFilterProxyModel.git
[submodule "client/3rd-prebuilt"]
path = client/3rd-prebuilt
url = https://github.com/amnezia-vpn/3rd-prebuilt
[submodule "client/3rd/amneziawg-apple"]
path = client/3rd/amneziawg-apple
url = https://github.com/amnezia-vpn/amneziawg-apple

47
.gitpod.Dockerfile vendored Normal file
View File

@@ -0,0 +1,47 @@
FROM gitpod/workspace-full-vnc
USER gitpod
RUN sudo apt-get -q update \
&& sudo apt-get install -yq \
build-essential \
libgl1-mesa-dev \
libgstreamer-gl1.0-0 \
libpulse-dev \
libsecret-1-dev \
libxcb-glx0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-render0 \
libxcb-shape0 \
libxcb-shm0 \
libxcb-sync1 \
libxcb-util1 \
libxcb-xfixes0 \
libxcb-xinerama0 \
libxcb1 \
libxkbcommon-dev \
libxkbcommon-x11-0 \
libxcb-xkb-dev \
p7zip-full \
&& sudo rm -rf /var/lib/apt/lists/*
RUN sudo pip3 install aqtinstall
ARG QT_VERSION=6.4.1
ARG QT_ARCH=gcc_64
ARG QT_DIR=/opt/qt
RUN sudo aqt install-qt --outputdir ${QT_DIR} linux desktop ${QT_VERSION} ${QT_ARCH} --modules \
qtremoteobjects \
qt5compat \
qtshadertools
ENV QT_BIN_DIR=${QT_DIR}/${QT_VERSION}/${QT_ARCH}/bin
ARG QIF_VERSION=4.5
ARG QIF_DIR=/opt/qif
RUN sudo aqt install-tool --outputdir ${QIF_DIR} linux desktop tools_ifw
ENV QIF_BIN_DIR=${QIF_DIR}/Tools/QtInstallerFramework/${QIF_VERSION}/bin

8
.gitpod.yml Normal file
View File

@@ -0,0 +1,8 @@
tasks:
- init: >-
deploy/build_linux.sh
image:
file: .gitpod.Dockerfile
vscode:
extensions:
- llvm-vs-code-extensions.vscode-clangd

View File

@@ -1,73 +0,0 @@
language: cpp
branches:
only:
- master
- dev
jobs:
include:
- name: MacOS
os: osx
osx_image: xcode12.2
script:
- |
if [ ! -f $HOME/Qt/5.14.2/clang_64/bin/qmake ]; then \
brew install p7zip && \
pip3 install aqtinstall requests py7zr && \
python3 -m aqt install --outputdir $HOME/Qt 5.14.2 mac desktop clang_64 -m qtbase && \
python3 -m aqt tool --outputdir $HOME/Qt mac tools_ifw 4.0.1 qt.tools.ifw.40;
fi
- bash deploy/build_macos.sh
- name: Windows
os: windows
env:
- PATH=/c/Python39:/c/Python39/Scripts:$PATH
before_install:
- if [ ! -f /C/Qt/5.14.2/msvc2017/bin/qmake ]; then choco install python --version 3.9.1; fi
script:
- dir "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build"
- dir "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools"
- |
if [ ! -f /C/Qt/5.14.2/msvc2017/bin/qmake ]; then \
pip3 install aqtinstall requests py7zr && \
python -m aqt install --outputdir /C/Qt 5.14.2 windows desktop win32_msvc2017 -m qtbase && \
python -m aqt tool --outputdir /C/Qt windows tools_ifw 4.0.1 qt.tools.ifw.40; \
fi
- echo 'call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat"' > winbuild.bat
- echo -e "\r\n" >> winbuild.bat
- echo 'call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsamd64_x86.bat"' >> winbuild.bat
- echo -e "\r\n" >> winbuild.bat
- echo -e "deploy\\\build_windows.bat" >> winbuild.bat
- cat winbuild.bat
- cmd //c winbuild.bat
deploy:
provider: releases
api_key: $GH_TOKEN
file:
- "AmneziaVPN.exe"
- "AmneziaVPN.dmg"
skip_cleanup: true
on:
tags: true
branch: master
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
cache:
directories:
- $HOME/Qt
- /C/Qt
- $HOME/Library/Caches/Homebrew

View File

@@ -1,2 +0,0 @@
TEMPLATE = subdirs
SUBDIRS = client service platform

44
CMakeLists.txt Normal file
View File

@@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
set(PROJECT AmneziaVPN)
project(${PROJECT} VERSION 4.2.1.1
DESCRIPTION "AmneziaVPN"
HOMEPAGE_URL "https://amnezia.org/"
)
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
set(RELEASE_DATE "${CURRENT_DATE}")
set(APP_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH})
set(APP_ANDROID_VERSION_CODE 43)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(MZ_PLATFORM_NAME "linux")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(MZ_PLATFORM_NAME "windows")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(MZ_PLATFORM_NAME "macos")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(MZ_PLATFORM_NAME "android")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
set(MZ_PLATFORM_NAME "ios")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
set(MZ_PLATFORM_NAME "wasm")
endif()
set(QT_BUILD_TOOLS_WHEN_CROSS_COMPILING ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(APPLE AND NOT IOS)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()
add_subdirectory(client)
if(NOT IOS AND NOT ANDROID)
add_subdirectory(service)
include(${CMAKE_SOURCE_DIR}/deploy/installer/config.cmake)
endif()

149
README.md
View File

@@ -1,2 +1,149 @@
# Amnezia
# Amnezia VPN
## _The best client for self-hosted VPN_
[![Build Status](https://github.com/amnezia-vpn/amnezia-client/actions/workflows/deploy.yml/badge.svg?branch=dev)](https://github.com/amnezia-vpn/amnezia-client/actions/workflows/deploy.yml?query=branch:dev)
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/amnezia-vpn/amnezia-client)
Amnezia is an open-source VPN client, with a key feature that enables you to deploy your own VPN server on your server.
## Features
- Very easy to use - enter your ip address, ssh login and password, and Amnezia will automatically install VPN docker containers to your server and connect to VPN.
- OpenVPN, ShadowSocks, WireGuard, IKEv2 protocols support.
- Masking VPN with OpenVPN over Cloak plugin
- Split tunneling support - add any sites to client to enable VPN only for them (only for desktops)
- Windows, MacOS, Linux, Android, iOS releases.
## Links
[https://amnezia.org](https://amnezia.org) - project website
[https://www.reddit.com/r/AmneziaVPN](https://www.reddit.com/r/AmneziaVPN) - Reddit
[https://t.me/amnezia_vpn_en](https://t.me/amnezia_vpn_en) - Telegram support channel (English)
[https://t.me/amnezia_vpn](https://t.me/amnezia_vpn) - Telegram support channel (Russian)
## Tech
AmneziaVPN uses a number of open source projects to work:
- [OpenSSL](https://www.openssl.org/)
- [OpenVPN](https://openvpn.net/)
- [ShadowSocks](https://shadowsocks.org/)
- [Qt](https://www.qt.io/)
- [LibSsh](https://libssh.org) - forked form Qt Creator
- and more...
## Checking out the source code
Make sure to pull all submodules after checking out the repo.
```bash
git submodule update --init --recursive
```
## Development
Want to contribute? Welcome!
### Building sources and deployment
Look deploy folder for build scripts.
### How to build iOS app from source code on MacOS
1. First, make sure you have [XCode](https://developer.apple.com/xcode/) installed, at least version 14 or higher.
2. We use QT to generate the XCode project. we need QT version 6.6.1. Install QT for macos in [here](https://doc.qt.io/qt-6/macos.html) or [QT Online Installer](https://www.qt.io/download-open-source). Required modules:
- macOS
- iOS
- Qt 5 Compatibility Module
- Qt Shader Tools
- Additional Libraries:
- Qt Image Formats
- Qt Multimedia
- Qt Remote Objects
3. Install cmake is require. We recommend cmake version 3.25. You can install cmake in [here](https://cmake.org/download/)
4. You also need to install go >= v1.16. If you don't have it done already,
download go from the [official website](https://golang.org/dl/) or use Homebrew.
Latest version is recommended. Install gomobile
```bash
export PATH=$PATH:~/go/bin
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
```
5. Build project
```bash
export QT_BIN_DIR="<PATH-TO-QT-FOLDER>/Qt/<QT-VERSION>/ios/bin"
export QT_MACOS_ROOT_DIR="<PATH-TO-QT-FOLDER>/Qt/<QT-VERSION>/macos"
export QT_IOS_BIN=$QT_BIN_DIR
export PATH=$PATH:~/go/bin
mkdir build-ios
$QT_IOS_BIN/qt-cmake . -B build-ios -GXcode -DQT_HOST_PATH=$QT_MACOS_ROOT_DIR
```
Replace PATH-TO-QT-FOLDER and QT-VERSION to your environment
If you get `gomobile: command not found` make sure to set PATH to the location
of the bin folder where gomobile was installed. Usually, it's in `GOPATH`.
```bash
export PATH=$(PATH):/path/to/GOPATH/bin
```
5. Open XCode project. You can then run/test/archive/ship the app.
If build fails with the following error
```
make: ***
[$(PROJECTDIR)/client/build/AmneziaVPN.build/Debug-iphoneos/wireguard-go-bridge/goroot/.prepared]
Error 1
```
Add a user defined variable to both AmneziaVPN and WireGuardNetworkExtension targets' build settings with
key `PATH` and value `${PATH}/path/to/bin/folder/with/go/executable`, e.g. `${PATH}:/usr/local/go/bin`.
if above error still persists on you M1 Mac, then most probably you need to install arch based cmake
```
arch -arm64 brew install cmake
```
Build might fail with "source files not found" error the first time you try it, because modern XCode build system compiles
dependencies in parallel, and some dependencies end up being built after the ones that
require them. In this case simply restart the build.
## How to build the Android app
_tested on Mac OS_
The Android app has the following requirements:
* JDK 11
* Android platform SDK 33
* cmake 3.25.0
After you have installed QT, QT Creator and Android Studio installed, you need to configure QT Creator correctly. Click in the top menu bar on `QT Creator` -> `Preferences` -> `Devices` and select the tab `Android`.
* set path to jdk 11
* set path to Android SDK ($ANDROID_HOME)
In case you get errors regarding missing SDK or 'sdkmanager not running', you cannot fix them by correcting the paths and you have some spare GBs on your disk, you can let QT Creator install all requirements by choosing an empty folder for `Android SDK location` and click on `Set Up SDK`. Be aware: This will install a second Android SDK and NDK on your machine!
Double check that the right cmake version is configured: Click on `QT Creator` -> `Preferences` and click on the side menu on `Kits`. Under the center content view's `Kits` tab you'll find an entry `CMake Tool`. If the default selected CMake version is lower than 3.25.0, install on your system CMake >= 3.25.0 and choose `System CMake at <path>` from the drop down list. If this entry is missing, you either have not installed CMake yet or QT Creator hasn't found the path to it. In that case click in the preferences window on the side menu item `CMake`, then on the tab `Tools`in the center content view and finally on the Button `Add` to set the path to your installed CMake.
Please make sure that you have selected Android Platform SDK 33 for your project: click in the main view's side menu on on `Projects`, on the left you'll see a section `Build & Run` showing different Android build targets. You can select any of them, Amnezia VPN's project setup is designed in a way that always all Android targets will be build. Click on the targets submenu item `Build` and scroll in the center content view to `Build Steps`. Click on `Details` at the end of the headline `Build Android APK` (The `Details` button might be hidden in case QT Creator Window is not running in full screen!). Here we are: choose `android-33` as `Android Build platform SDK`.
That's it you should be ready to compile the project from QT Creator!
### Development flow
After you've hit the build button, QT-Creator copies the whole project to a folder in the repositories parent directory. The folder should look something like `build-amnezia-client-Android_Qt_<version>_Clang_<architecture>-<BuildType>`.
If you want to develop Amnezia VPNs Android components written in Kotlin, such as components using system APIs, you need to import the generated project in Android Studio with `build-amnezia-client-Android_Qt_<version>_Clang_<architecture>-<BuildType>/client/android-build` as the projects root directory. While you should be able to compile the generated project from Android Studio, you cannot work directly in the repository's Android project. So whenever you are confident with your work in the generated project, you'll need to copy and paste the affected files to the corresponding path in the repositories Android project so that you can add and commit your changes!
You may face compiling issues in QT Creator after you've worked in Android Studio on the generated project. Just do a `./gradlew clean` in the generated project's root directory (`<path>/client/android-build/.`) and you should be good to continue.
## License
GPL v.3
## Donate
Bitcoin: bc1qn9rhsffuxwnhcuuu4qzrwp4upkrq94xnh8r26u
XMR: 48spms39jt1L2L5vyw2RQW6CXD6odUd4jFu19GZcDyKKQV9U88wsJVjSbL4CfRys37jVMdoaWVPSvezCQPhHXUW5UKLqUp3
payeer.com: P2561305
ko-fi.com: [https://ko-fi.com/amnezia_vpn](https://ko-fi.com/amnezia_vpn)
## etc
This project is tested with BrowserStack.
We express our gratitude to [BrowserStack](https://www.browserstack.com) for supporting our project.

1
client/3rd-prebuilt Submodule

Submodule client/3rd-prebuilt added at e568e7d0e8

1
client/3rd/CocoaAsyncSocket vendored Submodule

1
client/3rd/CocoaLumberjack vendored Submodule

1
client/3rd/OpenVPNAdapter vendored Submodule

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>PacketProcessor.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,18 @@
//
// CocoaAsyncSocket.h
// CocoaAsyncSocket
//
// Created by Derek Clarkson on 10/08/2015.
// CocoaAsyncSocket project is in the public domain.
//
#import <Foundation/Foundation.h>
//! Project version number for CocoaAsyncSocket.
FOUNDATION_EXPORT double cocoaAsyncSocketVersionNumber;
//! Project version string for CocoaAsyncSocket.
FOUNDATION_EXPORT const unsigned char cocoaAsyncSocketVersionString[];
#import <CocoaAsyncSocket/GCDAsyncSocket.h>
#import <CocoaAsyncSocket/GCDAsyncUdpSocket.h>

View File

@@ -0,0 +1,6 @@
framework module CocoaAsyncSocket {
umbrella header "CocoaAsyncSocket.h"
export *
module * { export * }
}

View File

@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/CocoaAsyncSocket.h</key>
<data>
19xueMkhcDCf6A2ihyiTCDjWjd4=
</data>
<key>Headers/GCDAsyncSocket.h</key>
<data>
JwDJxahaKup9fnB5MJuoxDHbdDs=
</data>
<key>Headers/GCDAsyncUdpSocket.h</key>
<data>
9hL7D86xSUKQ1TBRDa+fDNkDlqI=
</data>
<key>Info.plist</key>
<data>
eCKEB+C8HfC7DIu6eNc6P3wxyLo=
</data>
<key>Modules/module.modulemap</key>
<data>
+n94rYTWDjekX3imyh+PSyA9vgA=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/CocoaAsyncSocket.h</key>
<dict>
<key>hash</key>
<data>
19xueMkhcDCf6A2ihyiTCDjWjd4=
</data>
<key>hash2</key>
<data>
VpE7gL1U1p/0urO77FEjPNjY06qrttQJnalOd+6VYDQ=
</data>
</dict>
<key>Headers/GCDAsyncSocket.h</key>
<dict>
<key>hash</key>
<data>
JwDJxahaKup9fnB5MJuoxDHbdDs=
</data>
<key>hash2</key>
<data>
JL0b2lWPgVphz/ekZLsGMKrShDXTK2YY53aKtusc9hk=
</data>
</dict>
<key>Headers/GCDAsyncUdpSocket.h</key>
<dict>
<key>hash</key>
<data>
9hL7D86xSUKQ1TBRDa+fDNkDlqI=
</data>
<key>hash2</key>
<data>
uNVm5yZ0jBhGDXZuAynPXvem1qcBvAVdWXAewQdJbh8=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash</key>
<data>
+n94rYTWDjekX3imyh+PSyA9vgA=
</data>
<key>hash2</key>
<data>
RoVn8xMeEnU3Izg0DtYjYL/krI8V7qw0sa7Ggf+08Rs=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleSignature</key>
<string>????</string>
</dict>
</plist>

View File

@@ -0,0 +1,19 @@
//
// PacketProcessor.h
// PacketProcessor
//
// Created by sanchez on 20.12.2021.
//
#import <Foundation/Foundation.h>
//! Project version number for PacketProcessor.
FOUNDATION_EXPORT double PacketProcessorVersionNumber;
//! Project version string for PacketProcessor.
FOUNDATION_EXPORT const unsigned char PacketProcessorVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <PacketProcessor/PublicHeader.h>
#import "TunnelInterface.h"

View File

@@ -0,0 +1,23 @@
//
// TunnelInterface.h
// Potatso
//
// Created by LEI on 12/23/15.
// Copyright © 2015 TouchingApp. All rights reserved.
//
#import <Foundation/Foundation.h>
@import NetworkExtension;
#define TunnelMTU 1600
#define kTun2SocksStoppedNotification @"kTun2SocksStoppedNotification"
@interface TunnelInterface : NSObject
+ (TunnelInterface *)sharedInterface;
+ (NSError *)setupWithPacketTunnelFlow:(NEPacketTunnelFlow *)packetFlow;
+ (void)processPackets;
+ (void)writePacket: (NSData *)packet;
+ (void)startTun2Socks: (int)socksServerPort;
+ (void)stop;
@end

View File

@@ -0,0 +1,239 @@
//
// TunnelInterface.m
// Potatso
//
// Created by LEI on 12/23/15.
// Copyright © 2015 TouchingApp. All rights reserved.
//
#import "TunnelInterface.h"
#import <netinet/ip.h>
#import "ipv4/lwip/ip4.h"
#import "lwip/udp.h"
#import "lwip/ip.h"
#import <arpa/inet.h>
#import "inet_chksum.h"
#import "tun2socks/tun2socks.h"
@import CocoaAsyncSocket;
#define kTunnelInterfaceErrorDomain [NSString stringWithFormat:@"%@.TunnelInterface", [[NSBundle mainBundle] bundleIdentifier]]
@interface TunnelInterface () <GCDAsyncUdpSocketDelegate>
@property (nonatomic) NEPacketTunnelFlow *tunnelPacketFlow;
@property (nonatomic) NSMutableDictionary *udpSession;
@property (nonatomic) GCDAsyncUdpSocket *udpSocket;
@property (nonatomic) int readFd;
@property (nonatomic) int writeFd;
@end
@implementation TunnelInterface
+ (TunnelInterface *)sharedInterface {
static dispatch_once_t onceToken;
static TunnelInterface *interface;
dispatch_once(&onceToken, ^{
interface = [TunnelInterface new];
});
return interface;
}
- (instancetype)init {
self = [super init];
if (self) {
_udpSession = [NSMutableDictionary dictionaryWithCapacity:5];
_udpSocket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue:dispatch_queue_create("udp", NULL)];
}
return self;
}
+ (NSError *)setupWithPacketTunnelFlow:(NEPacketTunnelFlow *)packetFlow {
if (packetFlow == nil) {
return [NSError errorWithDomain:kTunnelInterfaceErrorDomain code:1 userInfo:@{NSLocalizedDescriptionKey: @"PacketTunnelFlow can't be nil."}];
}
[TunnelInterface sharedInterface].tunnelPacketFlow = packetFlow;
NSError *error;
GCDAsyncUdpSocket *udpSocket = [TunnelInterface sharedInterface].udpSocket;
[udpSocket bindToPort:0 error:&error];
if (error) {
return [NSError errorWithDomain:kTunnelInterfaceErrorDomain code:1 userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat:@"UDP bind fail(%@).", [error localizedDescription]]}];
}
[udpSocket beginReceiving:&error];
if (error) {
return [NSError errorWithDomain:kTunnelInterfaceErrorDomain code:1 userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat:@"UDP bind fail(%@).", [error localizedDescription]]}];
}
int fds[2];
if (pipe(fds) < 0) {
return [NSError errorWithDomain:kTunnelInterfaceErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey: @"Unable to pipe."}];
}
[TunnelInterface sharedInterface].readFd = fds[0];
[TunnelInterface sharedInterface].writeFd = fds[1];
return nil;
}
+ (void)startTun2Socks: (int)socksServerPort {
[NSThread detachNewThreadSelector:@selector(_startTun2Socks:) toTarget:[TunnelInterface sharedInterface] withObject:@(socksServerPort)];
}
+ (void)stop {
stop_tun2socks();
}
+ (void)writePacket:(NSData *)packet {
dispatch_async(dispatch_get_main_queue(), ^{
[[TunnelInterface sharedInterface].tunnelPacketFlow writePackets:@[packet] withProtocols:@[@(AF_INET)]];
});
}
+ (void)processPackets {
__weak typeof(self) weakSelf = self;
[[TunnelInterface sharedInterface].tunnelPacketFlow readPacketsWithCompletionHandler:^(NSArray<NSData *> * _Nonnull packets, NSArray<NSNumber *> * _Nonnull protocols) {
for (NSData *packet in packets) {
uint8_t *data = (uint8_t *)packet.bytes;
struct ip_hdr *iphdr = (struct ip_hdr *)data;
uint8_t proto = IPH_PROTO(iphdr);
if (proto == IP_PROTO_UDP) {
[[TunnelInterface sharedInterface] handleUDPPacket:packet];
}else if (proto == IP_PROTO_TCP) {
[[TunnelInterface sharedInterface] handleTCPPPacket:packet];
}
}
[weakSelf processPackets];
}];
}
- (void)_startTun2Socks: (NSNumber *)socksServerPort {
char socks_server[50];
sprintf(socks_server, "127.0.0.1:%d", (int)([socksServerPort integerValue]));
#if TCP_DATA_LOG_ENABLE
char *log_lvel = "debug";
#else
char *log_lvel = "none";
#endif
char *argv[] = {
"tun2socks",
"--netif-ipaddr",
"192.0.2.4",
"--netif-netmask",
"255.255.255.0",
"--loglevel",
log_lvel,
"--socks-server-addr",
socks_server
};
tun2socks_main(sizeof(argv)/sizeof(argv[0]), argv, self.readFd, TunnelMTU);
close(self.readFd);
close(self.writeFd);
[[NSNotificationCenter defaultCenter] postNotificationName:kTun2SocksStoppedNotification object:nil];
}
- (void)handleTCPPPacket: (NSData *)packet {
uint8_t message[TunnelMTU+2];
memcpy(message + 2, packet.bytes, packet.length);
message[0] = packet.length / 256;
message[1] = packet.length % 256;
write(self.writeFd , message , packet.length + 2);
}
- (void)handleUDPPacket: (NSData *)packet {
uint8_t *data = (uint8_t *)packet.bytes;
int data_len = (int)packet.length;
struct ip_hdr *iphdr = (struct ip_hdr *)data;
uint8_t version = IPH_V(iphdr);
switch (version) {
case 4: {
uint16_t iphdr_hlen = IPH_HL(iphdr) * 4;
data = data + iphdr_hlen;
data_len -= iphdr_hlen;
struct udp_hdr *udphdr = (struct udp_hdr *)data;
data = data + sizeof(struct udp_hdr *);
data_len -= sizeof(struct udp_hdr *);
NSData *outData = [[NSData alloc] initWithBytes:data length:data_len];
struct in_addr dest = { iphdr->dest.addr };
NSString *destHost = [NSString stringWithUTF8String:inet_ntoa(dest)];
NSString *key = [self strForHost:iphdr->dest.addr port:udphdr->dest];
NSString *value = [self strForHost:iphdr->src.addr port:udphdr->src];;
self.udpSession[key] = value;
[self.udpSocket sendData:outData toHost:destHost port:ntohs(udphdr->dest) withTimeout:30 tag:0];
} break;
case 6: {
} break;
}
}
- (void)udpSocket:(GCDAsyncUdpSocket *)sock didReceiveData:(NSData *)data fromAddress:(NSData *)address withFilterContext:(id)filterContext {
const struct sockaddr_in *addr = (const struct sockaddr_in *)[address bytes];
ip_addr_p_t dest ={ addr->sin_addr.s_addr };
in_port_t dest_port = addr->sin_port;
NSString *strHostPort = self.udpSession[[self strForHost:dest.addr port:dest_port]];
NSArray *hostPortArray = [strHostPort componentsSeparatedByString:@":"];
int src_ip = [hostPortArray[0] intValue];
int src_port = [hostPortArray[1] intValue];
uint8_t *bytes = (uint8_t *)[data bytes];
int bytes_len = (int)data.length;
int udp_length = sizeof(struct udp_hdr) + bytes_len;
int total_len = IP_HLEN + udp_length;
ip_addr_p_t src = {src_ip};
struct ip_hdr *iphdr = generateNewIPHeader(IP_PROTO_UDP, dest, src, total_len);
struct udp_hdr udphdr;
udphdr.src = dest_port;
udphdr.dest = src_port;
udphdr.len = hton16(udp_length);
udphdr.chksum = hton16(0);
uint8_t *udpdata = malloc(sizeof(uint8_t) * udp_length);
memcpy(udpdata, &udphdr, sizeof(struct udp_hdr));
memcpy(udpdata + sizeof(struct udp_hdr), bytes, bytes_len);
ip_addr_t odest = { dest.addr };
ip_addr_t osrc = { src_ip };
struct pbuf *p_udp = pbuf_alloc(PBUF_TRANSPORT, udp_length, PBUF_RAM);
pbuf_take(p_udp, udpdata, udp_length);
struct udp_hdr *new_udphdr = (struct udp_hdr *) p_udp->payload;
new_udphdr->chksum = inet_chksum_pseudo(p_udp, IP_PROTO_UDP, p_udp->len, &odest, &osrc);
uint8_t *ipdata = malloc(sizeof(uint8_t) * total_len);
memcpy(ipdata, iphdr, IP_HLEN);
memcpy(ipdata + sizeof(struct ip_hdr), p_udp->payload, udp_length);
NSData *outData = [[NSData alloc] initWithBytes:ipdata length:total_len];
free(ipdata);
free(iphdr);
free(udpdata);
pbuf_free(p_udp);
[TunnelInterface writePacket:outData];
}
struct ip_hdr *generateNewIPHeader(u8_t proto, ip_addr_p_t src, ip_addr_p_t dest, uint16_t total_len) {
struct ip_hdr *iphdr = malloc(sizeof(struct ip_hdr));
IPH_VHL_SET(iphdr, 4, IP_HLEN / 4);
IPH_TOS_SET(iphdr, 0);
IPH_LEN_SET(iphdr, htons(total_len));
IPH_ID_SET(iphdr, 0);
IPH_OFFSET_SET(iphdr, 0);
IPH_TTL_SET(iphdr, 64);
IPH_PROTO_SET(iphdr, IP_PROTO_UDP);
iphdr->src = src;
iphdr->dest = dest;
IPH_CHKSUM_SET(iphdr, 0);
IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));
return iphdr;
}
- (NSString *)strForHost: (int)host port: (int)port {
return [NSString stringWithFormat:@"%d:%d",host, port];
}
@end

View File

@@ -0,0 +1,400 @@
/**
* @file BLog.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* A global object for logging.
*/
#ifndef BADVPN_BLOG_H
#define BADVPN_BLOG_H
#include <stdarg.h>
#include <string.h>
#include "misc/debug.h"
#include "misc/memref.h"
#include "base/BMutex.h"
// auto-generated channel numbers and number of channels
#include "generated/blog_channels_defines.h"
// keep in sync with level names in BLog.c!
#define BLOG_ERROR 1
#define BLOG_WARNING 2
#define BLOG_NOTICE 3
#define BLOG_INFO 4
#define BLOG_DEBUG 5
#define BLog(...) BLog_LogToChannel(BLOG_CURRENT_CHANNEL, __VA_ARGS__)
#define BContextLog(context, ...) BLog_ContextLog((context), BLOG_CURRENT_CHANNEL, __VA_ARGS__)
#define BLOG_CCCC(context) BLog_MakeChannelContext((context), BLOG_CURRENT_CHANNEL)
typedef void (*_BLog_log_func) (int channel, int level, const char *msg);
typedef void (*_BLog_free_func) (void);
struct _BLog_channel {
const char *name;
int loglevel;
};
struct _BLog_global {
#ifndef NDEBUG
int initialized; // initialized statically
#endif
struct _BLog_channel channels[BLOG_NUM_CHANNELS];
_BLog_log_func log_func;
_BLog_free_func free_func;
BMutex mutex;
#ifndef NDEBUG
int logging;
#endif
char logbuf[2048];
int logbuf_pos;
};
extern struct _BLog_channel blog_channel_list[];
extern struct _BLog_global blog_global;
typedef void (*BLog_logfunc) (void *);
typedef struct {
BLog_logfunc logfunc;
void *logfunc_user;
} BLogContext;
typedef struct {
BLogContext context;
int channel;
} BLogChannelContext;
static int BLogGlobal_GetChannelByName (const char *channel_name);
static void BLog_Init (_BLog_log_func log_func, _BLog_free_func free_func);
static void BLog_Free (void);
static void BLog_SetChannelLoglevel (int channel, int loglevel);
static int BLog_WouldLog (int channel, int level);
static void BLog_Begin (void);
static void BLog_AppendVarArg (const char *fmt, va_list vl);
static void BLog_Append (const char *fmt, ...);
static void BLog_AppendBytes (MemRef data);
static void BLog_Finish (int channel, int level);
static void BLog_LogToChannelVarArg (int channel, int level, const char *fmt, va_list vl);
static void BLog_LogToChannel (int channel, int level, const char *fmt, ...);
static void BLog_LogViaFuncVarArg (BLog_logfunc func, void *arg, int channel, int level, const char *fmt, va_list vl);
static void BLog_LogViaFunc (BLog_logfunc func, void *arg, int channel, int level, const char *fmt, ...);
static BLogContext BLog_RootContext (void);
static BLogContext BLog_MakeContext (BLog_logfunc logfunc, void *logfunc_user);
static void BLog_ContextLogVarArg (BLogContext context, int channel, int level, const char *fmt, va_list vl);
static void BLog_ContextLog (BLogContext context, int channel, int level, const char *fmt, ...);
static BLogChannelContext BLog_MakeChannelContext (BLogContext context, int channel);
static void BLog_ChannelContextLogVarArg (BLogChannelContext ccontext, int level, const char *fmt, va_list vl);
static void BLog_ChannelContextLog (BLogChannelContext ccontext, int level, const char *fmt, ...);
void BLog_InitStdout (void);
void BLog_InitStderr (void);
int BLogGlobal_GetChannelByName (const char *channel_name)
{
int i;
for (i = 0; i < BLOG_NUM_CHANNELS; i++) {
if (!strcmp(blog_channel_list[i].name, channel_name)) {
return i;
}
}
return -1;
}
void BLog_Init (_BLog_log_func log_func, _BLog_free_func free_func)
{
ASSERT(!blog_global.initialized)
#ifndef NDEBUG
blog_global.initialized = 1;
#endif
// initialize channels
memcpy(blog_global.channels, blog_channel_list, BLOG_NUM_CHANNELS * sizeof(struct _BLog_channel));
blog_global.log_func = log_func;
blog_global.free_func = free_func;
#ifndef NDEBUG
blog_global.logging = 0;
#endif
blog_global.logbuf_pos = 0;
blog_global.logbuf[0] = '\0';
ASSERT_FORCE(BMutex_Init(&blog_global.mutex))
}
void BLog_Free (void)
{
ASSERT(blog_global.initialized)
#ifndef NDEBUG
ASSERT(!blog_global.logging)
#endif
BMutex_Free(&blog_global.mutex);
#ifndef NDEBUG
blog_global.initialized = 0;
#endif
blog_global.free_func();
}
void BLog_SetChannelLoglevel (int channel, int loglevel)
{
ASSERT(blog_global.initialized)
ASSERT(channel >= 0 && channel < BLOG_NUM_CHANNELS)
ASSERT(loglevel >= 0 && loglevel <= BLOG_DEBUG)
blog_global.channels[channel].loglevel = loglevel;
}
int BLog_WouldLog (int channel, int level)
{
ASSERT(blog_global.initialized)
ASSERT(channel >= 0 && channel < BLOG_NUM_CHANNELS)
ASSERT(level >= BLOG_ERROR && level <= BLOG_DEBUG)
return (level <= blog_global.channels[channel].loglevel);
}
void BLog_Begin (void)
{
ASSERT(blog_global.initialized)
BMutex_Lock(&blog_global.mutex);
#ifndef NDEBUG
ASSERT(!blog_global.logging)
blog_global.logging = 1;
#endif
}
void BLog_AppendVarArg (const char *fmt, va_list vl)
{
ASSERT(blog_global.initialized)
#ifndef NDEBUG
ASSERT(blog_global.logging)
#endif
ASSERT(blog_global.logbuf_pos >= 0)
ASSERT(blog_global.logbuf_pos < sizeof(blog_global.logbuf))
int w = vsnprintf(blog_global.logbuf + blog_global.logbuf_pos, sizeof(blog_global.logbuf) - blog_global.logbuf_pos, fmt, vl);
if (w >= sizeof(blog_global.logbuf) - blog_global.logbuf_pos) {
blog_global.logbuf_pos = sizeof(blog_global.logbuf) - 1;
} else {
blog_global.logbuf_pos += w;
}
}
void BLog_Append (const char *fmt, ...)
{
ASSERT(blog_global.initialized)
#ifndef NDEBUG
ASSERT(blog_global.logging)
#endif
va_list vl;
va_start(vl, fmt);
BLog_AppendVarArg(fmt, vl);
va_end(vl);
}
void BLog_AppendBytes (MemRef data)
{
ASSERT(blog_global.initialized)
#ifndef NDEBUG
ASSERT(blog_global.logging)
#endif
ASSERT(blog_global.logbuf_pos >= 0)
ASSERT(blog_global.logbuf_pos < sizeof(blog_global.logbuf))
size_t avail = (sizeof(blog_global.logbuf) - 1) - blog_global.logbuf_pos;
data.len = (data.len > avail ? avail : data.len);
memcpy(blog_global.logbuf + blog_global.logbuf_pos, data.ptr, data.len);
blog_global.logbuf_pos += data.len;
blog_global.logbuf[blog_global.logbuf_pos] = '\0';
}
void BLog_Finish (int channel, int level)
{
ASSERT(blog_global.initialized)
#ifndef NDEBUG
ASSERT(blog_global.logging)
#endif
ASSERT(channel >= 0 && channel < BLOG_NUM_CHANNELS)
ASSERT(level >= BLOG_ERROR && level <= BLOG_DEBUG)
ASSERT(BLog_WouldLog(channel, level))
ASSERT(blog_global.logbuf_pos >= 0)
ASSERT(blog_global.logbuf_pos < sizeof(blog_global.logbuf))
ASSERT(blog_global.logbuf[blog_global.logbuf_pos] == '\0')
blog_global.log_func(channel, level, blog_global.logbuf);
#ifndef NDEBUG
blog_global.logging = 0;
#endif
blog_global.logbuf_pos = 0;
blog_global.logbuf[0] = '\0';
BMutex_Unlock(&blog_global.mutex);
}
void BLog_LogToChannelVarArg (int channel, int level, const char *fmt, va_list vl)
{
ASSERT(blog_global.initialized)
ASSERT(channel >= 0 && channel < BLOG_NUM_CHANNELS)
ASSERT(level >= BLOG_ERROR && level <= BLOG_DEBUG)
if (!BLog_WouldLog(channel, level)) {
return;
}
BLog_Begin();
BLog_AppendVarArg(fmt, vl);
BLog_Finish(channel, level);
}
void BLog_LogToChannel (int channel, int level, const char *fmt, ...)
{
ASSERT(blog_global.initialized)
ASSERT(channel >= 0 && channel < BLOG_NUM_CHANNELS)
ASSERT(level >= BLOG_ERROR && level <= BLOG_DEBUG)
if (!BLog_WouldLog(channel, level)) {
return;
}
va_list vl;
va_start(vl, fmt);
BLog_Begin();
BLog_AppendVarArg(fmt, vl);
BLog_Finish(channel, level);
va_end(vl);
}
void BLog_LogViaFuncVarArg (BLog_logfunc func, void *arg, int channel, int level, const char *fmt, va_list vl)
{
ASSERT(blog_global.initialized)
ASSERT(channel >= 0 && channel < BLOG_NUM_CHANNELS)
ASSERT(level >= BLOG_ERROR && level <= BLOG_DEBUG)
if (!BLog_WouldLog(channel, level)) {
return;
}
BLog_Begin();
func(arg);
BLog_AppendVarArg(fmt, vl);
BLog_Finish(channel, level);
}
void BLog_LogViaFunc (BLog_logfunc func, void *arg, int channel, int level, const char *fmt, ...)
{
ASSERT(blog_global.initialized)
ASSERT(channel >= 0 && channel < BLOG_NUM_CHANNELS)
ASSERT(level >= BLOG_ERROR && level <= BLOG_DEBUG)
if (!BLog_WouldLog(channel, level)) {
return;
}
va_list vl;
va_start(vl, fmt);
BLog_Begin();
func(arg);
BLog_AppendVarArg(fmt, vl);
BLog_Finish(channel, level);
va_end(vl);
}
static void BLog__root_logfunc (void *unused)
{
}
static BLogContext BLog_RootContext (void)
{
return BLog_MakeContext(BLog__root_logfunc, NULL);
}
static BLogContext BLog_MakeContext (BLog_logfunc logfunc, void *logfunc_user)
{
ASSERT(logfunc)
BLogContext context;
context.logfunc = logfunc;
context.logfunc_user = logfunc_user;
return context;
}
static void BLog_ContextLogVarArg (BLogContext context, int channel, int level, const char *fmt, va_list vl)
{
BLog_LogViaFuncVarArg(context.logfunc, context.logfunc_user, channel, level, fmt, vl);
}
static void BLog_ContextLog (BLogContext context, int channel, int level, const char *fmt, ...)
{
va_list vl;
va_start(vl, fmt);
BLog_ContextLogVarArg(context, channel, level, fmt, vl);
va_end(vl);
}
static BLogChannelContext BLog_MakeChannelContext (BLogContext context, int channel)
{
BLogChannelContext ccontext;
ccontext.context = context;
ccontext.channel = channel;
return ccontext;
}
static void BLog_ChannelContextLogVarArg (BLogChannelContext ccontext, int level, const char *fmt, va_list vl)
{
BLog_ContextLogVarArg(ccontext.context, ccontext.channel, level, fmt, vl);
}
static void BLog_ChannelContextLog (BLogChannelContext ccontext, int level, const char *fmt, ...)
{
va_list vl;
va_start(vl, fmt);
BLog_ChannelContextLogVarArg(ccontext, level, fmt, vl);
va_end(vl);
}
#endif

View File

@@ -0,0 +1,75 @@
/**
* @file BLog.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <stddef.h>
#include <Foundation/Foundation.h>
#include "BLog.h"
#ifndef BADVPN_PLUGIN
struct _BLog_channel blog_channel_list[] = {
#include "generated/blog_channels_list.h"
};
struct _BLog_global blog_global = {
#ifndef NDEBUG
0
#endif
};
#endif
// keep in sync with level numbers in BLog.h!
static char *level_names[] = { NULL, "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG" };
static void stdout_log (int channel, int level, const char *msg)
{
NSLog(@"%s(%s): %s\n", level_names[level], blog_global.channels[channel].name, msg);
}
static void stderr_log (int channel, int level, const char *msg)
{
NSLog(@"%s(%s): %s\n", level_names[level], blog_global.channels[channel].name, msg);
}
static void stdout_stderr_free (void)
{
}
void BLog_InitStdout (void)
{
BLog_Init(stdout_log, stdout_stderr_free);
}
void BLog_InitStderr (void)
{
BLog_Init(stderr_log, stdout_stderr_free);
}

View File

@@ -0,0 +1,150 @@
/**
* @file BLog_syslog.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include <stdio.h>
#include <syslog.h>
#include "misc/debug.h"
#include "BLog_syslog.h"
static int resolve_facility (char *str, int *out)
{
if (!strcmp(str, "authpriv")) {
*out = LOG_AUTHPRIV;
}
else if (!strcmp(str, "cron")) {
*out = LOG_CRON;
}
else if (!strcmp(str, "daemon")) {
*out = LOG_DAEMON;
}
else if (!strcmp(str, "ftp")) {
*out = LOG_FTP;
}
else if (!strcmp(str, "local0")) {
*out = LOG_LOCAL0;
}
else if (!strcmp(str, "local1")) {
*out = LOG_LOCAL1;
}
else if (!strcmp(str, "local2")) {
*out = LOG_LOCAL2;
}
else if (!strcmp(str, "local3")) {
*out = LOG_LOCAL3;
}
else if (!strcmp(str, "local4")) {
*out = LOG_LOCAL4;
}
else if (!strcmp(str, "local5")) {
*out = LOG_LOCAL5;
}
else if (!strcmp(str, "local6")) {
*out = LOG_LOCAL6;
}
else if (!strcmp(str, "local7")) {
*out = LOG_LOCAL7;
}
else if (!strcmp(str, "lpr")) {
*out = LOG_LPR;
}
else if (!strcmp(str, "mail")) {
*out = LOG_MAIL;
}
else if (!strcmp(str, "news")) {
*out = LOG_NEWS;
}
else if (!strcmp(str, "syslog")) {
*out = LOG_SYSLOG;
}
else if (!strcmp(str, "user")) {
*out = LOG_USER;
}
else if (!strcmp(str, "uucp")) {
*out = LOG_UUCP;
}
else {
return 0;
}
return 1;
}
static int convert_level (int level)
{
ASSERT(level >= BLOG_ERROR && level <= BLOG_DEBUG)
switch (level) {
case BLOG_ERROR:
return LOG_ERR;
case BLOG_WARNING:
return LOG_WARNING;
case BLOG_NOTICE:
return LOG_NOTICE;
case BLOG_INFO:
return LOG_INFO;
case BLOG_DEBUG:
return LOG_DEBUG;
default:
ASSERT(0)
return 0;
}
}
static struct {
char ident[200];
} syslog_global;
static void syslog_log (int channel, int level, const char *msg)
{
syslog(convert_level(level), "%s: %s", blog_global.channels[channel].name, msg);
}
static void syslog_free (void)
{
closelog();
}
int BLog_InitSyslog (char *ident, char *facility_str)
{
int facility;
if (!resolve_facility(facility_str, &facility)) {
return 0;
}
snprintf(syslog_global.ident, sizeof(syslog_global.ident), "%s", ident);
openlog(syslog_global.ident, 0, facility);
BLog_Init(syslog_log, syslog_free);
return 1;
}

View File

@@ -0,0 +1,42 @@
/**
* @file BLog_syslog.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* BLog syslog backend.
*/
#ifndef BADVPN_BLOG_SYSLOG_H
#define BADVPN_BLOG_SYSLOG_H
#include "misc/debug.h"
#include "base/BLog.h"
int BLog_InitSyslog (char *ident, char *facility) WARN_UNUSED;
#endif

View File

@@ -0,0 +1,101 @@
/**
* @file BMutex.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BADVPN_BMUTEX_H
#define BADVPN_BMUTEX_H
#if !defined(BADVPN_THREAD_SAFE) || (BADVPN_THREAD_SAFE != 0 && BADVPN_THREAD_SAFE != 1)
#error BADVPN_THREAD_SAFE is not defined or incorrect
#endif
#if BADVPN_THREAD_SAFE
#include <pthread.h>
#endif
#include "misc/debug.h"
#include "base/DebugObject.h"
typedef struct {
#if BADVPN_THREAD_SAFE
pthread_mutex_t pthread_mutex;
#endif
DebugObject d_obj;
} BMutex;
static int BMutex_Init (BMutex *o) WARN_UNUSED;
static void BMutex_Free (BMutex *o);
static void BMutex_Lock (BMutex *o);
static void BMutex_Unlock (BMutex *o);
static int BMutex_Init (BMutex *o)
{
#if BADVPN_THREAD_SAFE
if (pthread_mutex_init(&o->pthread_mutex, NULL) != 0) {
return 0;
}
#endif
DebugObject_Init(&o->d_obj);
return 1;
}
static void BMutex_Free (BMutex *o)
{
DebugObject_Free(&o->d_obj);
#if BADVPN_THREAD_SAFE
int res = pthread_mutex_destroy(&o->pthread_mutex);
B_USE(res)
ASSERT(res == 0)
#endif
}
static void BMutex_Lock (BMutex *o)
{
DebugObject_Access(&o->d_obj);
#if BADVPN_THREAD_SAFE
int res = pthread_mutex_lock(&o->pthread_mutex);
B_USE(res)
ASSERT(res == 0)
#endif
}
static void BMutex_Unlock (BMutex *o)
{
DebugObject_Access(&o->d_obj);
#if BADVPN_THREAD_SAFE
int res = pthread_mutex_unlock(&o->pthread_mutex);
B_USE(res)
ASSERT(res == 0)
#endif
}
#endif

View File

@@ -0,0 +1,205 @@
/**
* @file BPending.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stddef.h>
#include "misc/debug.h"
#include "misc/offset.h"
#include "BPending.h"
#include "BPending_list.h"
#include "structure/SLinkedList_impl.h"
void BPendingGroup_Init (BPendingGroup *g)
{
// init jobs list
BPending__List_Init(&g->jobs);
// init pending counter
DebugCounter_Init(&g->pending_ctr);
// init debug object
DebugObject_Init(&g->d_obj);
}
void BPendingGroup_Free (BPendingGroup *g)
{
DebugCounter_Free(&g->pending_ctr);
ASSERT(BPending__List_IsEmpty(&g->jobs))
DebugObject_Free(&g->d_obj);
}
int BPendingGroup_HasJobs (BPendingGroup *g)
{
DebugObject_Access(&g->d_obj);
return !BPending__List_IsEmpty(&g->jobs);
}
void BPendingGroup_ExecuteJob (BPendingGroup *g)
{
ASSERT(!BPending__List_IsEmpty(&g->jobs))
DebugObject_Access(&g->d_obj);
// get a job
BSmallPending *p = BPending__List_First(&g->jobs);
ASSERT(!BPending__ListIsRemoved(p))
ASSERT(p->pending)
// remove from jobs list
BPending__List_RemoveFirst(&g->jobs);
// set not pending
BPending__ListMarkRemoved(p);
#ifndef NDEBUG
p->pending = 0;
#endif
// execute job
p->handler(p->user);
return;
}
BSmallPending * BPendingGroup_PeekJob (BPendingGroup *g)
{
DebugObject_Access(&g->d_obj);
return BPending__List_First(&g->jobs);
}
void BSmallPending_Init (BSmallPending *o, BPendingGroup *g, BSmallPending_handler handler, void *user)
{
// init arguments
o->handler = handler;
o->user = user;
// set not pending
BPending__ListMarkRemoved(o);
#ifndef NDEBUG
o->pending = 0;
#endif
// increment pending counter
DebugCounter_Increment(&g->pending_ctr);
// init debug object
DebugObject_Init(&o->d_obj);
}
void BSmallPending_Free (BSmallPending *o, BPendingGroup *g)
{
DebugCounter_Decrement(&g->pending_ctr);
DebugObject_Free(&o->d_obj);
ASSERT(o->pending == !BPending__ListIsRemoved(o))
// remove from jobs list
if (!BPending__ListIsRemoved(o)) {
BPending__List_Remove(&g->jobs, o);
}
}
void BSmallPending_SetHandler (BSmallPending *o, BSmallPending_handler handler, void *user)
{
DebugObject_Access(&o->d_obj);
// set handler
o->handler = handler;
o->user = user;
}
void BSmallPending_Set (BSmallPending *o, BPendingGroup *g)
{
DebugObject_Access(&o->d_obj);
ASSERT(o->pending == !BPending__ListIsRemoved(o))
// remove from jobs list
if (!BPending__ListIsRemoved(o)) {
BPending__List_Remove(&g->jobs, o);
}
// insert to jobs list
BPending__List_Prepend(&g->jobs, o);
// set pending
#ifndef NDEBUG
o->pending = 1;
#endif
}
void BSmallPending_Unset (BSmallPending *o, BPendingGroup *g)
{
DebugObject_Access(&o->d_obj);
ASSERT(o->pending == !BPending__ListIsRemoved(o))
if (!BPending__ListIsRemoved(o)) {
// remove from jobs list
BPending__List_Remove(&g->jobs, o);
// set not pending
BPending__ListMarkRemoved(o);
#ifndef NDEBUG
o->pending = 0;
#endif
}
}
int BSmallPending_IsSet (BSmallPending *o)
{
DebugObject_Access(&o->d_obj);
ASSERT(o->pending == !BPending__ListIsRemoved(o))
return !BPending__ListIsRemoved(o);
}
void BPending_Init (BPending *o, BPendingGroup *g, BPending_handler handler, void *user)
{
BSmallPending_Init(&o->base, g, handler, user);
o->g = g;
}
void BPending_Free (BPending *o)
{
BSmallPending_Free(&o->base, o->g);
}
void BPending_Set (BPending *o)
{
BSmallPending_Set(&o->base, o->g);
}
void BPending_Unset (BPending *o)
{
BSmallPending_Unset(&o->base, o->g);
}
int BPending_IsSet (BPending *o)
{
return BSmallPending_IsSet(&o->base);
}

View File

@@ -0,0 +1,250 @@
/**
* @file BPending.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Module for managing a queue of jobs pending execution.
*/
#ifndef BADVPN_BPENDING_H
#define BADVPN_BPENDING_H
#include <stdint.h>
#include "misc/debugcounter.h"
#include "structure/SLinkedList.h"
#include "base/DebugObject.h"
struct BSmallPending_s;
#include "BPending_list.h"
#include "structure/SLinkedList_decl.h"
/**
* Job execution handler.
* It is guaranteed that the associated {@link BSmallPending} object was
* in set state.
* The {@link BSmallPending} object enters not set state before the handler
* is called.
*
* @param user as in {@link BSmallPending_Init}
*/
typedef void (*BSmallPending_handler) (void *user);
/**
* Job execution handler.
* It is guaranteed that the associated {@link BPending} object was
* in set state.
* The {@link BPending} object enters not set state before the handler
* is called.
*
* @param user as in {@link BPending_Init}
*/
typedef void (*BPending_handler) (void *user);
/**
* Object that contains a list of jobs pending execution.
*/
typedef struct {
BPending__List jobs;
DebugCounter pending_ctr;
DebugObject d_obj;
} BPendingGroup;
/**
* Object for queuing a job for execution.
*/
typedef struct BSmallPending_s {
BPending_handler handler;
void *user;
BPending__ListNode pending_node; // optimization: if not pending, .next is this
#ifndef NDEBUG
uint8_t pending;
#endif
DebugObject d_obj;
} BSmallPending;
/**
* Object for queuing a job for execution. This is a convenience wrapper
* around {@link BSmallPending} with an extra field to remember the
* {@link BPendingGroup} being used.
*/
typedef struct {
BSmallPending base;
BPendingGroup *g;
} BPending;
/**
* Initializes the object.
*
* @param g the object
*/
void BPendingGroup_Init (BPendingGroup *g);
/**
* Frees the object.
* There must be no {@link BPending} or {@link BSmallPending} objects using
* this group.
*
* @param g the object
*/
void BPendingGroup_Free (BPendingGroup *g);
/**
* Checks if there is at least one job in the queue.
*
* @param g the object
* @return 1 if there is at least one job, 0 if not
*/
int BPendingGroup_HasJobs (BPendingGroup *g);
/**
* Executes the top job on the job list.
* The job is removed from the list and enters
* not set state before being executed.
* There must be at least one job in job list.
*
* @param g the object
*/
void BPendingGroup_ExecuteJob (BPendingGroup *g);
/**
* Returns the top job on the job list, or NULL if there are none.
*
* @param g the object
* @return the top job if there is at least one job, NULL if not
*/
BSmallPending * BPendingGroup_PeekJob (BPendingGroup *g);
/**
* Initializes the object.
* The object is initialized in not set state.
*
* @param o the object
* @param g pending group to use
* @param handler job execution handler
* @param user value to pass to handler
*/
void BSmallPending_Init (BSmallPending *o, BPendingGroup *g, BSmallPending_handler handler, void *user);
/**
* Frees the object.
* The execution handler will not be called after the object
* is freed.
*
* @param o the object
* @param g pending group. Must be the same as was used in {@link BSmallPending_Init}.
*/
void BSmallPending_Free (BSmallPending *o, BPendingGroup *g);
/**
* Changes the job execution handler.
*
* @param o the object
* @param handler job execution handler
* @param user value to pass to handler
*/
void BSmallPending_SetHandler (BSmallPending *o, BSmallPending_handler handler, void *user);
/**
* Enables the job, pushing it to the top of the job list.
* If the object was already in set state, the job is removed from its
* current position in the list before being pushed.
* The object enters set state.
*
* @param o the object
* @param g pending group. Must be the same as was used in {@link BSmallPending_Init}.
*/
void BSmallPending_Set (BSmallPending *o, BPendingGroup *g);
/**
* Disables the job, removing it from the job list.
* If the object was not in set state, nothing is done.
* The object enters not set state.
*
* @param o the object
* @param g pending group. Must be the same as was used in {@link BSmallPending_Init}.
*/
void BSmallPending_Unset (BSmallPending *o, BPendingGroup *g);
/**
* Checks if the job is in set state.
*
* @param o the object
* @return 1 if in set state, 0 if not
*/
int BSmallPending_IsSet (BSmallPending *o);
/**
* Initializes the object.
* The object is initialized in not set state.
*
* @param o the object
* @param g pending group to use
* @param handler job execution handler
* @param user value to pass to handler
*/
void BPending_Init (BPending *o, BPendingGroup *g, BPending_handler handler, void *user);
/**
* Frees the object.
* The execution handler will not be called after the object
* is freed.
*
* @param o the object
*/
void BPending_Free (BPending *o);
/**
* Enables the job, pushing it to the top of the job list.
* If the object was already in set state, the job is removed from its
* current position in the list before being pushed.
* The object enters set state.
*
* @param o the object
*/
void BPending_Set (BPending *o);
/**
* Disables the job, removing it from the job list.
* If the object was not in set state, nothing is done.
* The object enters not set state.
*
* @param o the object
*/
void BPending_Unset (BPending *o);
/**
* Checks if the job is in set state.
*
* @param o the object
* @return 1 if in set state, 0 if not
*/
int BPending_IsSet (BPending *o);
#endif

View File

@@ -0,0 +1,4 @@
#define SLINKEDLIST_PARAM_NAME BPending__List
#define SLINKEDLIST_PARAM_FEATURE_LAST 0
#define SLINKEDLIST_PARAM_TYPE_ENTRY struct BSmallPending_s
#define SLINKEDLIST_PARAM_MEMBER_NODE pending_node

View File

@@ -0,0 +1,39 @@
/**
* @file DebugObject.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "DebugObject.h"
#ifndef BADVPN_PLUGIN
#ifndef NDEBUG
DebugCounter debugobject_counter = DEBUGCOUNTER_STATIC;
#if BADVPN_THREAD_SAFE
pthread_mutex_t debugobject_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
#endif
#endif

View File

@@ -0,0 +1,147 @@
/**
* @file DebugObject.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Object used for detecting leaks.
*/
#ifndef BADVPN_DEBUGOBJECT_H
#define BADVPN_DEBUGOBJECT_H
#include <stdint.h>
#if !defined(BADVPN_THREAD_SAFE) || (BADVPN_THREAD_SAFE != 0 && BADVPN_THREAD_SAFE != 1)
#error BADVPN_THREAD_SAFE is not defined or incorrect
#endif
#if BADVPN_THREAD_SAFE
#include <pthread.h>
#endif
#include "misc/debug.h"
#include "misc/debugcounter.h"
#define DEBUGOBJECT_VALID UINT32_C(0x31415926)
/**
* Object used for detecting leaks.
*/
typedef struct {
#ifndef NDEBUG
uint32_t c;
#endif
} DebugObject;
/**
* Initializes the object.
*
* @param obj the object
*/
static void DebugObject_Init (DebugObject *obj);
/**
* Frees the object.
*
* @param obj the object
*/
static void DebugObject_Free (DebugObject *obj);
/**
* Does nothing.
*
* @param obj the object
*/
static void DebugObject_Access (const DebugObject *obj);
/**
* Does nothing.
* There must be no {@link DebugObject}'s initialized.
*/
static void DebugObjectGlobal_Finish (void);
#ifndef NDEBUG
extern DebugCounter debugobject_counter;
#if BADVPN_THREAD_SAFE
extern pthread_mutex_t debugobject_mutex;
#endif
#endif
void DebugObject_Init (DebugObject *obj)
{
#ifndef NDEBUG
obj->c = DEBUGOBJECT_VALID;
#if BADVPN_THREAD_SAFE
ASSERT_FORCE(pthread_mutex_lock(&debugobject_mutex) == 0)
#endif
DebugCounter_Increment(&debugobject_counter);
#if BADVPN_THREAD_SAFE
ASSERT_FORCE(pthread_mutex_unlock(&debugobject_mutex) == 0)
#endif
#endif
}
void DebugObject_Free (DebugObject *obj)
{
ASSERT(obj->c == DEBUGOBJECT_VALID)
#ifndef NDEBUG
obj->c = 0;
#if BADVPN_THREAD_SAFE
ASSERT_FORCE(pthread_mutex_lock(&debugobject_mutex) == 0)
#endif
DebugCounter_Decrement(&debugobject_counter);
#if BADVPN_THREAD_SAFE
ASSERT_FORCE(pthread_mutex_unlock(&debugobject_mutex) == 0)
#endif
#endif
}
void DebugObject_Access (const DebugObject *obj)
{
ASSERT(obj->c == DEBUGOBJECT_VALID)
}
void DebugObjectGlobal_Finish (void)
{
#ifndef NDEBUG
DebugCounter_Free(&debugobject_counter);
#endif
}
#endif

View File

@@ -0,0 +1,112 @@
/**
* @file BufferWriter.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "misc/debug.h"
#include "flow/BufferWriter.h"
static void output_handler_recv (BufferWriter *o, uint8_t *data)
{
ASSERT(!o->out_have)
// set output packet
o->out_have = 1;
o->out = data;
}
void BufferWriter_Init (BufferWriter *o, int mtu, BPendingGroup *pg)
{
ASSERT(mtu >= 0)
// init output
PacketRecvInterface_Init(&o->recv_interface, mtu, (PacketRecvInterface_handler_recv)output_handler_recv, o, pg);
// set no output packet
o->out_have = 0;
DebugObject_Init(&o->d_obj);
#ifndef NDEBUG
o->d_mtu = mtu;
o->d_writing = 0;
#endif
}
void BufferWriter_Free (BufferWriter *o)
{
DebugObject_Free(&o->d_obj);
// free output
PacketRecvInterface_Free(&o->recv_interface);
}
PacketRecvInterface * BufferWriter_GetOutput (BufferWriter *o)
{
DebugObject_Access(&o->d_obj);
return &o->recv_interface;
}
int BufferWriter_StartPacket (BufferWriter *o, uint8_t **buf)
{
ASSERT(!o->d_writing)
DebugObject_Access(&o->d_obj);
if (!o->out_have) {
return 0;
}
if (buf) {
*buf = o->out;
}
#ifndef NDEBUG
o->d_writing = 1;
#endif
return 1;
}
void BufferWriter_EndPacket (BufferWriter *o, int len)
{
ASSERT(len >= 0)
ASSERT(len <= o->d_mtu)
ASSERT(o->out_have)
ASSERT(o->d_writing)
DebugObject_Access(&o->d_obj);
// set no output packet
o->out_have = 0;
// finish packet
PacketRecvInterface_Done(&o->recv_interface, len);
#ifndef NDEBUG
o->d_writing = 0;
#endif
}

View File

@@ -0,0 +1,107 @@
/**
* @file BufferWriter.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Object for writing packets to a {@link PacketRecvInterface} client
* in a best-effort fashion.
*/
#ifndef BADVPN_FLOW_BUFFERWRITER_H
#define BADVPN_FLOW_BUFFERWRITER_H
#include <stdint.h>
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "flow/PacketRecvInterface.h"
/**
* Object for writing packets to a {@link PacketRecvInterface} client
* in a best-effort fashion.
*/
typedef struct {
PacketRecvInterface recv_interface;
int out_have;
uint8_t *out;
DebugObject d_obj;
#ifndef NDEBUG
int d_mtu;
int d_writing;
#endif
} BufferWriter;
/**
* Initializes the object.
* The object is initialized in not writing state.
*
* @param o the object
* @param mtu maximum input packet length
* @param pg pending group
*/
void BufferWriter_Init (BufferWriter *o, int mtu, BPendingGroup *pg);
/**
* Frees the object.
*
* @param o the object
*/
void BufferWriter_Free (BufferWriter *o);
/**
* Returns the output interface.
*
* @param o the object
* @return output interface
*/
PacketRecvInterface * BufferWriter_GetOutput (BufferWriter *o);
/**
* Attempts to provide a memory location for writing a packet.
* The object must be in not writing state.
* On success, the object enters writing state.
*
* @param o the object
* @param buf if not NULL, on success, the memory location will be stored here.
* It will have space for MTU bytes.
* @return 1 on success, 0 on failure
*/
int BufferWriter_StartPacket (BufferWriter *o, uint8_t **buf) WARN_UNUSED;
/**
* Submits a packet written to the buffer.
* The object must be in writing state.
* Yhe object enters not writing state.
*
* @param o the object
* @param len length of the packet that was written. Must be >=0 and
* <=MTU.
*/
void BufferWriter_EndPacket (BufferWriter *o, int len);
#endif

View File

@@ -0,0 +1,131 @@
/**
* @file PacketBuffer.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include "misc/debug.h"
#include "misc/balloc.h"
#include "flow/PacketBuffer.h"
static void input_handler_done (PacketBuffer *buf, int in_len);
static void output_handler_done (PacketBuffer *buf);
void input_handler_done (PacketBuffer *buf, int in_len)
{
ASSERT(in_len >= 0)
ASSERT(in_len <= buf->input_mtu)
DebugObject_Access(&buf->d_obj);
// remember if buffer is empty
int was_empty = (buf->buf.output_avail < 0);
// submit packet to buffer
ChunkBuffer2_SubmitPacket(&buf->buf, in_len);
// if there is space, schedule receive
if (buf->buf.input_avail >= buf->input_mtu) {
PacketRecvInterface_Receiver_Recv(buf->input, buf->buf.input_dest);
}
// if buffer was empty, schedule send
if (was_empty) {
PacketPassInterface_Sender_Send(buf->output, buf->buf.output_dest, buf->buf.output_avail);
}
}
void output_handler_done (PacketBuffer *buf)
{
DebugObject_Access(&buf->d_obj);
// remember if buffer is full
int was_full = (buf->buf.input_avail < buf->input_mtu);
// remove packet from buffer
ChunkBuffer2_ConsumePacket(&buf->buf);
// if buffer was full and there is space, schedule receive
if (was_full && buf->buf.input_avail >= buf->input_mtu) {
PacketRecvInterface_Receiver_Recv(buf->input, buf->buf.input_dest);
}
// if there is more data, schedule send
if (buf->buf.output_avail >= 0) {
PacketPassInterface_Sender_Send(buf->output, buf->buf.output_dest, buf->buf.output_avail);
}
}
int PacketBuffer_Init (PacketBuffer *buf, PacketRecvInterface *input, PacketPassInterface *output, int num_packets, BPendingGroup *pg)
{
ASSERT(PacketPassInterface_GetMTU(output) >= PacketRecvInterface_GetMTU(input))
ASSERT(num_packets > 0)
// init arguments
buf->input = input;
buf->output = output;
// init input
PacketRecvInterface_Receiver_Init(buf->input, (PacketRecvInterface_handler_done)input_handler_done, buf);
// set input MTU
buf->input_mtu = PacketRecvInterface_GetMTU(buf->input);
// init output
PacketPassInterface_Sender_Init(buf->output, (PacketPassInterface_handler_done)output_handler_done, buf);
// allocate buffer
int num_blocks = ChunkBuffer2_calc_blocks(buf->input_mtu, num_packets);
if (num_blocks < 0) {
goto fail0;
}
if (!(buf->buf_data = (struct ChunkBuffer2_block *)BAllocArray(num_blocks, sizeof(buf->buf_data[0])))) {
goto fail0;
}
// init buffer
ChunkBuffer2_Init(&buf->buf, buf->buf_data, num_blocks, buf->input_mtu);
// schedule receive
PacketRecvInterface_Receiver_Recv(buf->input, buf->buf.input_dest);
DebugObject_Init(&buf->d_obj);
return 1;
fail0:
return 0;
}
void PacketBuffer_Free (PacketBuffer *buf)
{
DebugObject_Free(&buf->d_obj);
// free buffer
BFree(buf->buf_data);
}

View File

@@ -0,0 +1,77 @@
/**
* @file PacketBuffer.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Packet buffer with {@link PacketRecvInterface} input and {@link PacketPassInterface} output.
*/
#ifndef BADVPN_FLOW_PACKETBUFFER_H
#define BADVPN_FLOW_PACKETBUFFER_H
#include <stdint.h>
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "structure/ChunkBuffer2.h"
#include "flow/PacketRecvInterface.h"
#include "flow/PacketPassInterface.h"
/**
* Packet buffer with {@link PacketRecvInterface} input and {@link PacketPassInterface} output.
*/
typedef struct {
DebugObject d_obj;
PacketRecvInterface *input;
int input_mtu;
PacketPassInterface *output;
struct ChunkBuffer2_block *buf_data;
ChunkBuffer2 buf;
} PacketBuffer;
/**
* Initializes the buffer.
* Output MTU must be >= input MTU.
*
* @param buf the object
* @param input input interface
* @param output output interface
* @param num_packets minimum number of packets the buffer must hold. Must be >0.
* @param pg pending group
* @return 1 on success, 0 on failure
*/
int PacketBuffer_Init (PacketBuffer *buf, PacketRecvInterface *input, PacketPassInterface *output, int num_packets, BPendingGroup *pg) WARN_UNUSED;
/**
* Frees the buffer.
*
* @param buf the object
*/
void PacketBuffer_Free (PacketBuffer *buf);
#endif

View File

@@ -0,0 +1,125 @@
/**
* @file PacketPassConnector.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stddef.h>
#include "misc/debug.h"
#include "flow/PacketPassConnector.h"
static void input_handler_send (PacketPassConnector *o, uint8_t *data, int data_len)
{
ASSERT(data_len >= 0)
ASSERT(data_len <= o->input_mtu)
ASSERT(o->in_len == -1)
DebugObject_Access(&o->d_obj);
// remember input packet
o->in_len = data_len;
o->in = data;
if (o->output) {
// schedule send
PacketPassInterface_Sender_Send(o->output, o->in, o->in_len);
}
}
static void output_handler_done (PacketPassConnector *o)
{
ASSERT(o->in_len >= 0)
ASSERT(o->output)
DebugObject_Access(&o->d_obj);
// have no input packet
o->in_len = -1;
// allow input to send more packets
PacketPassInterface_Done(&o->input);
}
void PacketPassConnector_Init (PacketPassConnector *o, int mtu, BPendingGroup *pg)
{
ASSERT(mtu >= 0)
// init arguments
o->input_mtu = mtu;
// init input
PacketPassInterface_Init(&o->input, o->input_mtu, (PacketPassInterface_handler_send)input_handler_send, o, pg);
// have no input packet
o->in_len = -1;
// have no output
o->output = NULL;
DebugObject_Init(&o->d_obj);
}
void PacketPassConnector_Free (PacketPassConnector *o)
{
DebugObject_Free(&o->d_obj);
// free input
PacketPassInterface_Free(&o->input);
}
PacketPassInterface * PacketPassConnector_GetInput (PacketPassConnector *o)
{
DebugObject_Access(&o->d_obj);
return &o->input;
}
void PacketPassConnector_ConnectOutput (PacketPassConnector *o, PacketPassInterface *output)
{
ASSERT(!o->output)
ASSERT(PacketPassInterface_GetMTU(output) >= o->input_mtu)
DebugObject_Access(&o->d_obj);
// set output
o->output = output;
// init output
PacketPassInterface_Sender_Init(o->output, (PacketPassInterface_handler_done)output_handler_done, o);
// if we have an input packet, schedule send
if (o->in_len >= 0) {
PacketPassInterface_Sender_Send(o->output, o->in, o->in_len);
}
}
void PacketPassConnector_DisconnectOutput (PacketPassConnector *o)
{
ASSERT(o->output)
DebugObject_Access(&o->d_obj);
// set no output
o->output = NULL;
}

View File

@@ -0,0 +1,102 @@
/**
* @file PacketPassConnector.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* A {@link PacketPassInterface} layer which allows the output to be
* connected and disconnected on the fly.
*/
#ifndef BADVPN_FLOW_PACKETPASSCONNECTOR_H
#define BADVPN_FLOW_PACKETPASSCONNECTOR_H
#include <stdint.h>
#include "base/DebugObject.h"
#include "flow/PacketPassInterface.h"
/**
* A {@link PacketPassInterface} layer which allows the output to be
* connected and disconnected on the fly.
*/
typedef struct {
PacketPassInterface input;
int input_mtu;
int in_len;
uint8_t *in;
PacketPassInterface *output;
DebugObject d_obj;
} PacketPassConnector;
/**
* Initializes the object.
* The object is initialized in not connected state.
*
* @param o the object
* @param mtu maximum input packet size. Must be >=0.
* @param pg pending group
*/
void PacketPassConnector_Init (PacketPassConnector *o, int mtu, BPendingGroup *pg);
/**
* Frees the object.
*
* @param o the object
*/
void PacketPassConnector_Free (PacketPassConnector *o);
/**
* Returns the input interface.
* The MTU of the interface will be as in {@link PacketPassConnector_Init}.
*
* @param o the object
* @return input interface
*/
PacketPassInterface * PacketPassConnector_GetInput (PacketPassConnector *o);
/**
* Connects output.
* The object must be in not connected state.
* The object enters connected state.
*
* @param o the object
* @param output output to connect. Its MTU must be >= MTU specified in
* {@link PacketPassConnector_Init}.
*/
void PacketPassConnector_ConnectOutput (PacketPassConnector *o, PacketPassInterface *output);
/**
* Disconnects output.
* The object must be in connected state.
* The object enters not connected state.
*
* @param o the object
*/
void PacketPassConnector_DisconnectOutput (PacketPassConnector *o);
#endif

View File

@@ -0,0 +1,405 @@
/**
* @file PacketPassFairQueue.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include "misc/debug.h"
#include "misc/offset.h"
#include "misc/minmax.h"
#include "misc/compare.h"
#include "flow/PacketPassFairQueue.h"
static int compare_flows (PacketPassFairQueueFlow *f1, PacketPassFairQueueFlow *f2)
{
int cmp = B_COMPARE(f1->time, f2->time);
if (cmp) {
return cmp;
}
return B_COMPARE((uintptr_t)f1, (uintptr_t)f2);
}
#include "PacketPassFairQueue_tree.h"
#include "structure/SAvl_impl.h"
static uint64_t get_current_time (PacketPassFairQueue *m)
{
if (m->sending_flow) {
return m->sending_flow->time;
}
uint64_t time = 0; // to remove warning
int have = 0;
PacketPassFairQueueFlow *first_flow = PacketPassFairQueue__Tree_GetFirst(&m->queued_tree, 0);
if (first_flow) {
ASSERT(first_flow->is_queued)
time = first_flow->time;
have = 1;
}
if (m->previous_flow) {
if (!have || m->previous_flow->time < time) {
time = m->previous_flow->time;
have = 1;
}
}
return (have ? time : 0);
}
static void increment_sent_flow (PacketPassFairQueueFlow *flow, uint64_t amount)
{
PacketPassFairQueue *m = flow->m;
ASSERT(amount <= FAIRQUEUE_MAX_TIME)
ASSERT(!flow->is_queued)
ASSERT(!m->sending_flow)
// does time overflow?
if (amount > FAIRQUEUE_MAX_TIME - flow->time) {
// get time to subtract
uint64_t subtract;
PacketPassFairQueueFlow *first_flow = PacketPassFairQueue__Tree_GetFirst(&m->queued_tree, 0);
if (!first_flow) {
subtract = flow->time;
} else {
ASSERT(first_flow->is_queued)
subtract = first_flow->time;
}
// subtract time from all flows
for (LinkedList1Node *list_node = LinkedList1_GetFirst(&m->flows_list); list_node; list_node = LinkedList1Node_Next(list_node)) {
PacketPassFairQueueFlow *someflow = UPPER_OBJECT(list_node, PacketPassFairQueueFlow, list_node);
// don't subtract more time than there is, except for the just finished flow,
// where we allow time to underflow and then overflow to the correct value after adding to it
if (subtract > someflow->time && someflow != flow) {
ASSERT(!someflow->is_queued)
someflow->time = 0;
} else {
someflow->time -= subtract;
}
}
}
// add time to flow
flow->time += amount;
}
static void schedule (PacketPassFairQueue *m)
{
ASSERT(!m->sending_flow)
ASSERT(!m->previous_flow)
ASSERT(!m->freeing)
ASSERT(!PacketPassFairQueue__Tree_IsEmpty(&m->queued_tree))
// get first queued flow
PacketPassFairQueueFlow *qflow = PacketPassFairQueue__Tree_GetFirst(&m->queued_tree, 0);
ASSERT(qflow->is_queued)
// remove flow from queue
PacketPassFairQueue__Tree_Remove(&m->queued_tree, 0, qflow);
qflow->is_queued = 0;
// schedule send
PacketPassInterface_Sender_Send(m->output, qflow->queued.data, qflow->queued.data_len);
m->sending_flow = qflow;
m->sending_len = qflow->queued.data_len;
}
static void schedule_job_handler (PacketPassFairQueue *m)
{
ASSERT(!m->sending_flow)
ASSERT(!m->freeing)
DebugObject_Access(&m->d_obj);
// remove previous flow
m->previous_flow = NULL;
if (!PacketPassFairQueue__Tree_IsEmpty(&m->queued_tree)) {
schedule(m);
}
}
static void input_handler_send (PacketPassFairQueueFlow *flow, uint8_t *data, int data_len)
{
PacketPassFairQueue *m = flow->m;
ASSERT(flow != m->sending_flow)
ASSERT(!flow->is_queued)
ASSERT(!m->freeing)
DebugObject_Access(&flow->d_obj);
if (flow == m->previous_flow) {
// remove from previous flow
m->previous_flow = NULL;
} else {
// raise time
flow->time = bmax_uint64(flow->time, get_current_time(m));
}
// queue flow
flow->queued.data = data;
flow->queued.data_len = data_len;
int res = PacketPassFairQueue__Tree_Insert(&m->queued_tree, 0, flow, NULL);
ASSERT_EXECUTE(res)
flow->is_queued = 1;
if (!m->sending_flow && !BPending_IsSet(&m->schedule_job)) {
schedule(m);
}
}
static void output_handler_done (PacketPassFairQueue *m)
{
ASSERT(m->sending_flow)
ASSERT(!m->previous_flow)
ASSERT(!BPending_IsSet(&m->schedule_job))
ASSERT(!m->freeing)
ASSERT(!m->sending_flow->is_queued)
PacketPassFairQueueFlow *flow = m->sending_flow;
// sending finished
m->sending_flow = NULL;
// remember this flow so the schedule job can remove its time if it didn's send
m->previous_flow = flow;
// update flow time by packet size
increment_sent_flow(flow, (uint64_t)m->packet_weight + m->sending_len);
// schedule schedule
BPending_Set(&m->schedule_job);
// finish flow packet
PacketPassInterface_Done(&flow->input);
// call busy handler if set
if (flow->handler_busy) {
// handler is one-shot, unset it before calling
PacketPassFairQueue_handler_busy handler = flow->handler_busy;
flow->handler_busy = NULL;
// call handler
handler(flow->user);
return;
}
}
int PacketPassFairQueue_Init (PacketPassFairQueue *m, PacketPassInterface *output, BPendingGroup *pg, int use_cancel, int packet_weight)
{
ASSERT(packet_weight > 0)
ASSERT(use_cancel == 0 || use_cancel == 1)
ASSERT(!use_cancel || PacketPassInterface_HasCancel(output))
// init arguments
m->output = output;
m->pg = pg;
m->use_cancel = use_cancel;
m->packet_weight = packet_weight;
// make sure that (output MTU + packet_weight <= FAIRQUEUE_MAX_TIME)
if (!(
(PacketPassInterface_GetMTU(output) <= FAIRQUEUE_MAX_TIME) &&
(packet_weight <= FAIRQUEUE_MAX_TIME - PacketPassInterface_GetMTU(output))
)) {
goto fail0;
}
// init output
PacketPassInterface_Sender_Init(m->output, (PacketPassInterface_handler_done)output_handler_done, m);
// not sending
m->sending_flow = NULL;
// no previous flow
m->previous_flow = NULL;
// init queued tree
PacketPassFairQueue__Tree_Init(&m->queued_tree);
// init flows list
LinkedList1_Init(&m->flows_list);
// not freeing
m->freeing = 0;
// init schedule job
BPending_Init(&m->schedule_job, m->pg, (BPending_handler)schedule_job_handler, m);
DebugObject_Init(&m->d_obj);
DebugCounter_Init(&m->d_ctr);
return 1;
fail0:
return 0;
}
void PacketPassFairQueue_Free (PacketPassFairQueue *m)
{
ASSERT(LinkedList1_IsEmpty(&m->flows_list))
ASSERT(PacketPassFairQueue__Tree_IsEmpty(&m->queued_tree))
ASSERT(!m->previous_flow)
ASSERT(!m->sending_flow)
DebugCounter_Free(&m->d_ctr);
DebugObject_Free(&m->d_obj);
// free schedule job
BPending_Free(&m->schedule_job);
}
void PacketPassFairQueue_PrepareFree (PacketPassFairQueue *m)
{
DebugObject_Access(&m->d_obj);
// set freeing
m->freeing = 1;
}
int PacketPassFairQueue_GetMTU (PacketPassFairQueue *m)
{
DebugObject_Access(&m->d_obj);
return PacketPassInterface_GetMTU(m->output);
}
void PacketPassFairQueueFlow_Init (PacketPassFairQueueFlow *flow, PacketPassFairQueue *m)
{
ASSERT(!m->freeing)
DebugObject_Access(&m->d_obj);
// init arguments
flow->m = m;
// have no canfree handler
flow->handler_busy = NULL;
// init input
PacketPassInterface_Init(&flow->input, PacketPassInterface_GetMTU(flow->m->output), (PacketPassInterface_handler_send)input_handler_send, flow, m->pg);
// set time
flow->time = 0;
// add to flows list
LinkedList1_Append(&m->flows_list, &flow->list_node);
// is not queued
flow->is_queued = 0;
DebugObject_Init(&flow->d_obj);
DebugCounter_Increment(&m->d_ctr);
}
void PacketPassFairQueueFlow_Free (PacketPassFairQueueFlow *flow)
{
PacketPassFairQueue *m = flow->m;
ASSERT(m->freeing || flow != m->sending_flow)
DebugCounter_Decrement(&m->d_ctr);
DebugObject_Free(&flow->d_obj);
// remove from current flow
if (flow == m->sending_flow) {
m->sending_flow = NULL;
}
// remove from previous flow
if (flow == m->previous_flow) {
m->previous_flow = NULL;
}
// remove from queue
if (flow->is_queued) {
PacketPassFairQueue__Tree_Remove(&m->queued_tree, 0, flow);
}
// remove from flows list
LinkedList1_Remove(&m->flows_list, &flow->list_node);
// free input
PacketPassInterface_Free(&flow->input);
}
void PacketPassFairQueueFlow_AssertFree (PacketPassFairQueueFlow *flow)
{
PacketPassFairQueue *m = flow->m;
B_USE(m)
ASSERT(m->freeing || flow != m->sending_flow)
DebugObject_Access(&flow->d_obj);
}
int PacketPassFairQueueFlow_IsBusy (PacketPassFairQueueFlow *flow)
{
PacketPassFairQueue *m = flow->m;
ASSERT(!m->freeing)
DebugObject_Access(&flow->d_obj);
return (flow == m->sending_flow);
}
void PacketPassFairQueueFlow_RequestCancel (PacketPassFairQueueFlow *flow)
{
PacketPassFairQueue *m = flow->m;
ASSERT(flow == m->sending_flow)
ASSERT(m->use_cancel)
ASSERT(!m->freeing)
ASSERT(!BPending_IsSet(&m->schedule_job))
DebugObject_Access(&flow->d_obj);
// request cancel
PacketPassInterface_Sender_RequestCancel(m->output);
}
void PacketPassFairQueueFlow_SetBusyHandler (PacketPassFairQueueFlow *flow, PacketPassFairQueue_handler_busy handler, void *user)
{
PacketPassFairQueue *m = flow->m;
B_USE(m)
ASSERT(flow == m->sending_flow)
ASSERT(!m->freeing)
DebugObject_Access(&flow->d_obj);
// set handler
flow->handler_busy = handler;
flow->user = user;
}
PacketPassInterface * PacketPassFairQueueFlow_GetInput (PacketPassFairQueueFlow *flow)
{
DebugObject_Access(&flow->d_obj);
return &flow->input;
}

View File

@@ -0,0 +1,204 @@
/**
* @file PacketPassFairQueue.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Fair queue using {@link PacketPassInterface}.
*/
#ifndef BADVPN_FLOW_PACKETPASSFAIRQUEUE_H
#define BADVPN_FLOW_PACKETPASSFAIRQUEUE_H
#include <stdint.h>
#include "misc/debug.h"
#include "misc/debugcounter.h"
#include "structure/SAvl.h"
#include "structure/LinkedList1.h"
#include "base/DebugObject.h"
#include "base/BPending.h"
#include "flow/PacketPassInterface.h"
// reduce this to test time overflow handling
#define FAIRQUEUE_MAX_TIME UINT64_MAX
typedef void (*PacketPassFairQueue_handler_busy) (void *user);
struct PacketPassFairQueueFlow_s;
#include "PacketPassFairQueue_tree.h"
#include "structure/SAvl_decl.h"
typedef struct PacketPassFairQueueFlow_s {
struct PacketPassFairQueue_s *m;
PacketPassFairQueue_handler_busy handler_busy;
void *user;
PacketPassInterface input;
uint64_t time;
LinkedList1Node list_node;
int is_queued;
struct {
PacketPassFairQueue__TreeNode tree_node;
uint8_t *data;
int data_len;
} queued;
DebugObject d_obj;
} PacketPassFairQueueFlow;
/**
* Fair queue using {@link PacketPassInterface}.
*/
typedef struct PacketPassFairQueue_s {
PacketPassInterface *output;
BPendingGroup *pg;
int use_cancel;
int packet_weight;
struct PacketPassFairQueueFlow_s *sending_flow;
int sending_len;
struct PacketPassFairQueueFlow_s *previous_flow;
PacketPassFairQueue__Tree queued_tree;
LinkedList1 flows_list;
int freeing;
BPending schedule_job;
DebugObject d_obj;
DebugCounter d_ctr;
} PacketPassFairQueue;
/**
* Initializes the queue.
*
* @param m the object
* @param output output interface
* @param pg pending group
* @param use_cancel whether cancel functionality is required. Must be 0 or 1.
* If 1, output must support cancel functionality.
* @param packet_weight additional weight a packet bears. Must be >0, to keep
* the queue fair for zero size packets.
* @return 1 on success, 0 on failure (because output MTU is too large)
*/
int PacketPassFairQueue_Init (PacketPassFairQueue *m, PacketPassInterface *output, BPendingGroup *pg, int use_cancel, int packet_weight) WARN_UNUSED;
/**
* Frees the queue.
* All flows must have been freed.
*
* @param m the object
*/
void PacketPassFairQueue_Free (PacketPassFairQueue *m);
/**
* Prepares for freeing the entire queue. Must be called to allow freeing
* the flows in the process of freeing the entire queue.
* After this function is called, flows and the queue must be freed
* before any further I/O.
* May be called multiple times.
* The queue enters freeing state.
*
* @param m the object
*/
void PacketPassFairQueue_PrepareFree (PacketPassFairQueue *m);
/**
* Returns the MTU of the queue.
*
* @param m the object
*/
int PacketPassFairQueue_GetMTU (PacketPassFairQueue *m);
/**
* Initializes a queue flow.
* Queue must not be in freeing state.
* Must not be called from queue calls to output.
*
* @param flow the object
* @param m queue to attach to
*/
void PacketPassFairQueueFlow_Init (PacketPassFairQueueFlow *flow, PacketPassFairQueue *m);
/**
* Frees a queue flow.
* Unless the queue is in freeing state:
* - The flow must not be busy as indicated by {@link PacketPassFairQueueFlow_IsBusy}.
* - Must not be called from queue calls to output.
*
* @param flow the object
*/
void PacketPassFairQueueFlow_Free (PacketPassFairQueueFlow *flow);
/**
* Does nothing.
* It must be possible to free the flow (see {@link PacketPassFairQueueFlow_Free}).
*
* @param flow the object
*/
void PacketPassFairQueueFlow_AssertFree (PacketPassFairQueueFlow *flow);
/**
* Determines if the flow is busy. If the flow is considered busy, it must not
* be freed. At any given time, at most one flow will be indicated as busy.
* Queue must not be in freeing state.
* Must not be called from queue calls to output.
*
* @param flow the object
* @return 0 if not busy, 1 is busy
*/
int PacketPassFairQueueFlow_IsBusy (PacketPassFairQueueFlow *flow);
/**
* Requests the output to stop processing the current packet as soon as possible.
* Cancel functionality must be enabled for the queue.
* The flow must be busy as indicated by {@link PacketPassFairQueueFlow_IsBusy}.
* Queue must not be in freeing state.
*
* @param flow the object
*/
void PacketPassFairQueueFlow_RequestCancel (PacketPassFairQueueFlow *flow);
/**
* Sets up a callback to be called when the flow is no longer busy.
* The handler will be called as soon as the flow is no longer busy, i.e. it is not
* possible that this flow is no longer busy before the handler is called.
* The flow must be busy as indicated by {@link PacketPassFairQueueFlow_IsBusy}.
* Queue must not be in freeing state.
* Must not be called from queue calls to output.
*
* @param flow the object
* @param handler callback function. NULL to disable.
* @param user value passed to callback function. Ignored if handler is NULL.
*/
void PacketPassFairQueueFlow_SetBusyHandler (PacketPassFairQueueFlow *flow, PacketPassFairQueue_handler_busy handler, void *user);
/**
* Returns the input interface of the flow.
*
* @param flow the object
* @return input interface
*/
PacketPassInterface * PacketPassFairQueueFlow_GetInput (PacketPassFairQueueFlow *flow);
#endif

View File

@@ -0,0 +1,7 @@
#define SAVL_PARAM_NAME PacketPassFairQueue__Tree
#define SAVL_PARAM_FEATURE_COUNTS 0
#define SAVL_PARAM_FEATURE_NOKEYS 1
#define SAVL_PARAM_TYPE_ENTRY struct PacketPassFairQueueFlow_s
#define SAVL_PARAM_TYPE_ARG int
#define SAVL_PARAM_FUN_COMPARE_ENTRIES(arg, entry1, entry2) compare_flows((entry1), (entry2))
#define SAVL_PARAM_MEMBER_NODE queued.tree_node

View File

@@ -0,0 +1,68 @@
/**
* @file PacketPassInterface.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "flow/PacketPassInterface.h"
void _PacketPassInterface_job_operation (PacketPassInterface *i)
{
ASSERT(i->state == PPI_STATE_OPERATION_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = PPI_STATE_BUSY;
// call handler
i->handler_operation(i->user_provider, i->job_operation_data, i->job_operation_len);
return;
}
void _PacketPassInterface_job_requestcancel (PacketPassInterface *i)
{
ASSERT(i->state == PPI_STATE_BUSY)
ASSERT(i->cancel_requested)
ASSERT(i->handler_requestcancel)
DebugObject_Access(&i->d_obj);
// call handler
i->handler_requestcancel(i->user_provider);
return;
}
void _PacketPassInterface_job_done (PacketPassInterface *i)
{
ASSERT(i->state == PPI_STATE_DONE_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = PPI_STATE_NONE;
// call handler
i->handler_done(i->user_user);
return;
}

View File

@@ -0,0 +1,236 @@
/**
* @file PacketPassInterface.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Interface allowing a packet sender to pass data packets to a packet receiver.
*/
#ifndef BADVPN_FLOW_PACKETPASSINTERFACE_H
#define BADVPN_FLOW_PACKETPASSINTERFACE_H
#include <stdint.h>
#include <stddef.h>
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "base/BPending.h"
#define PPI_STATE_NONE 1
#define PPI_STATE_OPERATION_PENDING 2
#define PPI_STATE_BUSY 3
#define PPI_STATE_DONE_PENDING 4
typedef void (*PacketPassInterface_handler_send) (void *user, uint8_t *data, int data_len);
typedef void (*PacketPassInterface_handler_requestcancel) (void *user);
typedef void (*PacketPassInterface_handler_done) (void *user);
typedef struct {
// provider data
int mtu;
PacketPassInterface_handler_send handler_operation;
PacketPassInterface_handler_requestcancel handler_requestcancel;
void *user_provider;
// user data
PacketPassInterface_handler_done handler_done;
void *user_user;
// operation job
BPending job_operation;
uint8_t *job_operation_data;
int job_operation_len;
// requestcancel job
BPending job_requestcancel;
// done job
BPending job_done;
// state
int state;
int cancel_requested;
DebugObject d_obj;
} PacketPassInterface;
static void PacketPassInterface_Init (PacketPassInterface *i, int mtu, PacketPassInterface_handler_send handler_operation, void *user, BPendingGroup *pg);
static void PacketPassInterface_Free (PacketPassInterface *i);
static void PacketPassInterface_EnableCancel (PacketPassInterface *i, PacketPassInterface_handler_requestcancel handler_requestcancel);
static void PacketPassInterface_Done (PacketPassInterface *i);
static int PacketPassInterface_GetMTU (PacketPassInterface *i);
static void PacketPassInterface_Sender_Init (PacketPassInterface *i, PacketPassInterface_handler_done handler_done, void *user);
static void PacketPassInterface_Sender_Send (PacketPassInterface *i, uint8_t *data, int data_len);
static void PacketPassInterface_Sender_RequestCancel (PacketPassInterface *i);
static int PacketPassInterface_HasCancel (PacketPassInterface *i);
void _PacketPassInterface_job_operation (PacketPassInterface *i);
void _PacketPassInterface_job_requestcancel (PacketPassInterface *i);
void _PacketPassInterface_job_done (PacketPassInterface *i);
void PacketPassInterface_Init (PacketPassInterface *i, int mtu, PacketPassInterface_handler_send handler_operation, void *user, BPendingGroup *pg)
{
ASSERT(mtu >= 0)
// init arguments
i->mtu = mtu;
i->handler_operation = handler_operation;
i->handler_requestcancel = NULL;
i->user_provider = user;
// set no user
i->handler_done = NULL;
// init jobs
BPending_Init(&i->job_operation, pg, (BPending_handler)_PacketPassInterface_job_operation, i);
BPending_Init(&i->job_requestcancel, pg, (BPending_handler)_PacketPassInterface_job_requestcancel, i);
BPending_Init(&i->job_done, pg, (BPending_handler)_PacketPassInterface_job_done, i);
// set state
i->state = PPI_STATE_NONE;
DebugObject_Init(&i->d_obj);
}
void PacketPassInterface_Free (PacketPassInterface *i)
{
DebugObject_Free(&i->d_obj);
// free jobs
BPending_Free(&i->job_done);
BPending_Free(&i->job_requestcancel);
BPending_Free(&i->job_operation);
}
void PacketPassInterface_EnableCancel (PacketPassInterface *i, PacketPassInterface_handler_requestcancel handler_requestcancel)
{
ASSERT(!i->handler_requestcancel)
ASSERT(!i->handler_done)
ASSERT(handler_requestcancel)
i->handler_requestcancel = handler_requestcancel;
}
void PacketPassInterface_Done (PacketPassInterface *i)
{
ASSERT(i->state == PPI_STATE_BUSY)
DebugObject_Access(&i->d_obj);
// unset requestcancel job
BPending_Unset(&i->job_requestcancel);
// schedule done
BPending_Set(&i->job_done);
// set state
i->state = PPI_STATE_DONE_PENDING;
}
int PacketPassInterface_GetMTU (PacketPassInterface *i)
{
DebugObject_Access(&i->d_obj);
return i->mtu;
}
void PacketPassInterface_Sender_Init (PacketPassInterface *i, PacketPassInterface_handler_done handler_done, void *user)
{
ASSERT(handler_done)
ASSERT(!i->handler_done)
DebugObject_Access(&i->d_obj);
i->handler_done = handler_done;
i->user_user = user;
}
void PacketPassInterface_Sender_Send (PacketPassInterface *i, uint8_t *data, int data_len)
{
ASSERT(data_len >= 0)
ASSERT(data_len <= i->mtu)
ASSERT(!(data_len > 0) || data)
ASSERT(i->state == PPI_STATE_NONE)
ASSERT(i->handler_done)
DebugObject_Access(&i->d_obj);
// schedule operation
i->job_operation_data = data;
i->job_operation_len = data_len;
BPending_Set(&i->job_operation);
// set state
i->state = PPI_STATE_OPERATION_PENDING;
i->cancel_requested = 0;
}
void PacketPassInterface_Sender_RequestCancel (PacketPassInterface *i)
{
ASSERT(i->state == PPI_STATE_OPERATION_PENDING || i->state == PPI_STATE_BUSY || i->state == PPI_STATE_DONE_PENDING)
ASSERT(i->handler_requestcancel)
DebugObject_Access(&i->d_obj);
// ignore multiple cancel requests
if (i->cancel_requested) {
return;
}
// remember we requested cancel
i->cancel_requested = 1;
if (i->state == PPI_STATE_OPERATION_PENDING) {
// unset operation job
BPending_Unset(&i->job_operation);
// set done job
BPending_Set(&i->job_done);
// set state
i->state = PPI_STATE_DONE_PENDING;
} else if (i->state == PPI_STATE_BUSY) {
// set requestcancel job
BPending_Set(&i->job_requestcancel);
}
}
int PacketPassInterface_HasCancel (PacketPassInterface *i)
{
DebugObject_Access(&i->d_obj);
return !!i->handler_requestcancel;
}
#endif

View File

@@ -0,0 +1,182 @@
/**
* @file PacketProtoDecoder.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include <string.h>
#include "misc/debug.h"
#include "misc/byteorder.h"
#include "misc/minmax.h"
#include "base/BLog.h"
#include "flow/PacketProtoDecoder.h"
#include "generated/blog_channel_PacketProtoDecoder.h"
static void process_data (PacketProtoDecoder *enc);
static void input_handler_done (PacketProtoDecoder *enc, int data_len);
static void output_handler_done (PacketProtoDecoder *enc);
void process_data (PacketProtoDecoder *enc)
{
int was_error = 0;
do {
uint8_t *data = enc->buf + enc->buf_start;
int left = enc->buf_used;
// check if header was received
if (left < sizeof(struct packetproto_header)) {
break;
}
struct packetproto_header header;
memcpy(&header, data, sizeof(header));
data += sizeof(struct packetproto_header);
left -= sizeof(struct packetproto_header);
int data_len = ltoh16(header.len);
// check data length
if (data_len > enc->output_mtu) {
BLog(BLOG_NOTICE, "error: packet too large");
was_error = 1;
break;
}
// check if whole packet was received
if (left < data_len) {
break;
}
// update buffer
enc->buf_start += sizeof(struct packetproto_header) + data_len;
enc->buf_used -= sizeof(struct packetproto_header) + data_len;
// submit packet
PacketPassInterface_Sender_Send(enc->output, data, data_len);
return;
} while (0);
if (was_error) {
// reset buffer
enc->buf_start = 0;
enc->buf_used = 0;
} else {
// if we reached the end of the buffer, wrap around to allow more data to be received
if (enc->buf_start + enc->buf_used == enc->buf_size) {
memmove(enc->buf, enc->buf + enc->buf_start, enc->buf_used);
enc->buf_start = 0;
}
}
// receive data
StreamRecvInterface_Receiver_Recv(enc->input, enc->buf + (enc->buf_start + enc->buf_used), enc->buf_size - (enc->buf_start + enc->buf_used));
// if we had error, report it
if (was_error) {
enc->handler_error(enc->user);
return;
}
}
static void input_handler_done (PacketProtoDecoder *enc, int data_len)
{
ASSERT(data_len > 0)
ASSERT(data_len <= enc->buf_size - (enc->buf_start + enc->buf_used))
DebugObject_Access(&enc->d_obj);
// update buffer
enc->buf_used += data_len;
// process data
process_data(enc);
return;
}
void output_handler_done (PacketProtoDecoder *enc)
{
DebugObject_Access(&enc->d_obj);
// process data
process_data(enc);
return;
}
int PacketProtoDecoder_Init (PacketProtoDecoder *enc, StreamRecvInterface *input, PacketPassInterface *output, BPendingGroup *pg, void *user, PacketProtoDecoder_handler_error handler_error)
{
// init arguments
enc->input = input;
enc->output = output;
enc->user = user;
enc->handler_error = handler_error;
// init input
StreamRecvInterface_Receiver_Init(enc->input, (StreamRecvInterface_handler_done)input_handler_done, enc);
// init output
PacketPassInterface_Sender_Init(enc->output, (PacketPassInterface_handler_done)output_handler_done, enc);
// set output MTU, limit by maximum payload size
enc->output_mtu = bmin_int(PacketPassInterface_GetMTU(enc->output), PACKETPROTO_MAXPAYLOAD);
// init buffer state
enc->buf_size = PACKETPROTO_ENCLEN(enc->output_mtu);
enc->buf_start = 0;
enc->buf_used = 0;
// allocate buffer
if (!(enc->buf = (uint8_t *)malloc(enc->buf_size))) {
goto fail0;
}
// start receiving
StreamRecvInterface_Receiver_Recv(enc->input, enc->buf, enc->buf_size);
DebugObject_Init(&enc->d_obj);
return 1;
fail0:
return 0;
}
void PacketProtoDecoder_Free (PacketProtoDecoder *enc)
{
DebugObject_Free(&enc->d_obj);
// free buffer
free(enc->buf);
}
void PacketProtoDecoder_Reset (PacketProtoDecoder *enc)
{
DebugObject_Access(&enc->d_obj);
enc->buf_start += enc->buf_used;
enc->buf_used = 0;
}

View File

@@ -0,0 +1,96 @@
/**
* @file PacketProtoDecoder.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Object which decodes a stream according to PacketProto.
*/
#ifndef BADVPN_FLOW_PACKETPROTODECODER_H
#define BADVPN_FLOW_PACKETPROTODECODER_H
#include <stdint.h>
#include "protocol/packetproto.h"
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "flow/StreamRecvInterface.h"
#include "flow/PacketPassInterface.h"
/**
* Handler called when a protocol error occurs.
* When an error occurs, the decoder is reset to the initial state.
*
* @param user as in {@link PacketProtoDecoder_Init}
*/
typedef void (*PacketProtoDecoder_handler_error) (void *user);
typedef struct {
StreamRecvInterface *input;
PacketPassInterface *output;
void *user;
PacketProtoDecoder_handler_error handler_error;
int output_mtu;
int buf_size;
int buf_start;
int buf_used;
uint8_t *buf;
DebugObject d_obj;
} PacketProtoDecoder;
/**
* Initializes the object.
*
* @param enc the object
* @param input input interface. The decoder will accept packets with payload size up to its MTU
* (but the payload can never be more than PACKETPROTO_MAXPAYLOAD).
* @param output output interface
* @param pg pending group
* @param user argument to handlers
* @param handler_error error handler
* @return 1 on success, 0 on failure
*/
int PacketProtoDecoder_Init (PacketProtoDecoder *enc, StreamRecvInterface *input, PacketPassInterface *output, BPendingGroup *pg, void *user, PacketProtoDecoder_handler_error handler_error) WARN_UNUSED;
/**
* Frees the object.
*
* @param enc the object
*/
void PacketProtoDecoder_Free (PacketProtoDecoder *enc);
/**
* Clears the internal buffer.
* The next data received from the input will be treated as a new
* PacketProto stream.
*
* @param enc the object
*/
void PacketProtoDecoder_Reset (PacketProtoDecoder *enc);
#endif

View File

@@ -0,0 +1,101 @@
/**
* @file PacketProtoEncoder.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stddef.h>
#include <string.h>
#include "protocol/packetproto.h"
#include "misc/balign.h"
#include "misc/debug.h"
#include "misc/byteorder.h"
#include "flow/PacketProtoEncoder.h"
static void output_handler_recv (PacketProtoEncoder *enc, uint8_t *data)
{
ASSERT(!enc->output_packet)
ASSERT(data)
DebugObject_Access(&enc->d_obj);
// schedule receive
enc->output_packet = data;
PacketRecvInterface_Receiver_Recv(enc->input, enc->output_packet + sizeof(struct packetproto_header));
}
static void input_handler_done (PacketProtoEncoder *enc, int in_len)
{
ASSERT(enc->output_packet)
DebugObject_Access(&enc->d_obj);
// write length
struct packetproto_header pp;
pp.len = htol16(in_len);
memcpy(enc->output_packet, &pp, sizeof(pp));
// finish output packet
enc->output_packet = NULL;
PacketRecvInterface_Done(&enc->output, PACKETPROTO_ENCLEN(in_len));
}
void PacketProtoEncoder_Init (PacketProtoEncoder *enc, PacketRecvInterface *input, BPendingGroup *pg)
{
ASSERT(PacketRecvInterface_GetMTU(input) <= PACKETPROTO_MAXPAYLOAD)
// init arguments
enc->input = input;
// init input
PacketRecvInterface_Receiver_Init(enc->input, (PacketRecvInterface_handler_done)input_handler_done, enc);
// init output
PacketRecvInterface_Init(
&enc->output, PACKETPROTO_ENCLEN(PacketRecvInterface_GetMTU(enc->input)),
(PacketRecvInterface_handler_recv)output_handler_recv, enc, pg
);
// set no output packet
enc->output_packet = NULL;
DebugObject_Init(&enc->d_obj);
}
void PacketProtoEncoder_Free (PacketProtoEncoder *enc)
{
DebugObject_Free(&enc->d_obj);
// free input
PacketRecvInterface_Free(&enc->output);
}
PacketRecvInterface * PacketProtoEncoder_GetOutput (PacketProtoEncoder *enc)
{
DebugObject_Access(&enc->d_obj);
return &enc->output;
}

View File

@@ -0,0 +1,80 @@
/**
* @file PacketProtoEncoder.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Object which encodes packets according to PacketProto.
*/
#ifndef BADVPN_FLOW_PACKETPROTOENCODER_H
#define BADVPN_FLOW_PACKETPROTOENCODER_H
#include <stdint.h>
#include "base/DebugObject.h"
#include "flow/PacketRecvInterface.h"
/**
* Object which encodes packets according to PacketProto.
*
* Input is with {@link PacketRecvInterface}.
* Output is with {@link PacketRecvInterface}.
*/
typedef struct {
PacketRecvInterface *input;
PacketRecvInterface output;
uint8_t *output_packet;
DebugObject d_obj;
} PacketProtoEncoder;
/**
* Initializes the object.
*
* @param enc the object
* @param input input interface. Its MTU must be <=PACKETPROTO_MAXPAYLOAD.
* @param pg pending group
*/
void PacketProtoEncoder_Init (PacketProtoEncoder *enc, PacketRecvInterface *input, BPendingGroup *pg);
/**
* Frees the object.
*
* @param enc the object
*/
void PacketProtoEncoder_Free (PacketProtoEncoder *enc);
/**
* Returns the output interface.
* The MTU of the output interface is PACKETPROTO_ENCLEN(MTU of input interface).
*
* @param enc the object
* @return output interface
*/
PacketRecvInterface * PacketProtoEncoder_GetOutput (PacketProtoEncoder *enc);
#endif

View File

@@ -0,0 +1,82 @@
/**
* @file PacketProtoFlow.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "protocol/packetproto.h"
#include "misc/debug.h"
#include "flow/PacketProtoFlow.h"
int PacketProtoFlow_Init (PacketProtoFlow *o, int input_mtu, int num_packets, PacketPassInterface *output, BPendingGroup *pg)
{
ASSERT(input_mtu >= 0)
ASSERT(input_mtu <= PACKETPROTO_MAXPAYLOAD)
ASSERT(num_packets > 0)
ASSERT(PacketPassInterface_GetMTU(output) >= PACKETPROTO_ENCLEN(input_mtu))
// init async input
BufferWriter_Init(&o->ainput, input_mtu, pg);
// init encoder
PacketProtoEncoder_Init(&o->encoder, BufferWriter_GetOutput(&o->ainput), pg);
// init buffer
if (!PacketBuffer_Init(&o->buffer, PacketProtoEncoder_GetOutput(&o->encoder), output, num_packets, pg)) {
goto fail0;
}
DebugObject_Init(&o->d_obj);
return 1;
fail0:
PacketProtoEncoder_Free(&o->encoder);
BufferWriter_Free(&o->ainput);
return 0;
}
void PacketProtoFlow_Free (PacketProtoFlow *o)
{
DebugObject_Free(&o->d_obj);
// free buffer
PacketBuffer_Free(&o->buffer);
// free encoder
PacketProtoEncoder_Free(&o->encoder);
// free async input
BufferWriter_Free(&o->ainput);
}
BufferWriter * PacketProtoFlow_GetInput (PacketProtoFlow *o)
{
DebugObject_Access(&o->d_obj);
return &o->ainput;
}

View File

@@ -0,0 +1,83 @@
/**
* @file PacketProtoFlow.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Buffer which encodes packets with PacketProto, with {@link BufferWriter}
* input and {@link PacketPassInterface} output.
*/
#ifndef BADVPN_FLOW_PACKETPROTOFLOW_H
#define BADVPN_FLOW_PACKETPROTOFLOW_H
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "flow/BufferWriter.h"
#include "flow/PacketProtoEncoder.h"
#include "flow/PacketBuffer.h"
/**
* Buffer which encodes packets with PacketProto, with {@link BufferWriter}
* input and {@link PacketPassInterface} output.
*/
typedef struct {
BufferWriter ainput;
PacketProtoEncoder encoder;
PacketBuffer buffer;
DebugObject d_obj;
} PacketProtoFlow;
/**
* Initializes the object.
*
* @param o the object
* @param input_mtu maximum input packet size. Must be >=0 and <=PACKETPROTO_MAXPAYLOAD.
* @param num_packets minimum number of packets the buffer should hold. Must be >0.
* @param output output interface. Its MTU must be >=PACKETPROTO_ENCLEN(input_mtu).
* @param pg pending group
* @return 1 on success, 0 on failure
*/
int PacketProtoFlow_Init (PacketProtoFlow *o, int input_mtu, int num_packets, PacketPassInterface *output, BPendingGroup *pg) WARN_UNUSED;
/**
* Frees the object.
*
* @param o the object
*/
void PacketProtoFlow_Free (PacketProtoFlow *o);
/**
* Returns the input interface.
*
* @param o the object
* @return input interface
*/
BufferWriter * PacketProtoFlow_GetInput (PacketProtoFlow *o);
#endif

View File

@@ -0,0 +1,56 @@
/**
* @file PacketRecvInterface.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "flow/PacketRecvInterface.h"
void _PacketRecvInterface_job_operation (PacketRecvInterface *i)
{
ASSERT(i->state == PRI_STATE_OPERATION_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = PRI_STATE_BUSY;
// call handler
i->handler_operation(i->user_provider, i->job_operation_data);
return;
}
void _PacketRecvInterface_job_done (PacketRecvInterface *i)
{
ASSERT(i->state == PRI_STATE_DONE_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = PRI_STATE_NONE;
// call handler
i->handler_done(i->user_user, i->job_done_len);
return;
}

View File

@@ -0,0 +1,170 @@
/**
* @file PacketRecvInterface.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Interface allowing a packet receiver to receive data packets from a packet sender.
*/
#ifndef BADVPN_FLOW_PACKETRECVINTERFACE_H
#define BADVPN_FLOW_PACKETRECVINTERFACE_H
#include <stdint.h>
#include <stddef.h>
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "base/BPending.h"
#define PRI_STATE_NONE 1
#define PRI_STATE_OPERATION_PENDING 2
#define PRI_STATE_BUSY 3
#define PRI_STATE_DONE_PENDING 4
typedef void (*PacketRecvInterface_handler_recv) (void *user, uint8_t *data);
typedef void (*PacketRecvInterface_handler_done) (void *user, int data_len);
typedef struct {
// provider data
int mtu;
PacketRecvInterface_handler_recv handler_operation;
void *user_provider;
// user data
PacketRecvInterface_handler_done handler_done;
void *user_user;
// operation job
BPending job_operation;
uint8_t *job_operation_data;
// done job
BPending job_done;
int job_done_len;
// state
int state;
DebugObject d_obj;
} PacketRecvInterface;
static void PacketRecvInterface_Init (PacketRecvInterface *i, int mtu, PacketRecvInterface_handler_recv handler_operation, void *user, BPendingGroup *pg);
static void PacketRecvInterface_Free (PacketRecvInterface *i);
static void PacketRecvInterface_Done (PacketRecvInterface *i, int data_len);
static int PacketRecvInterface_GetMTU (PacketRecvInterface *i);
static void PacketRecvInterface_Receiver_Init (PacketRecvInterface *i, PacketRecvInterface_handler_done handler_done, void *user);
static void PacketRecvInterface_Receiver_Recv (PacketRecvInterface *i, uint8_t *data);
void _PacketRecvInterface_job_operation (PacketRecvInterface *i);
void _PacketRecvInterface_job_done (PacketRecvInterface *i);
void PacketRecvInterface_Init (PacketRecvInterface *i, int mtu, PacketRecvInterface_handler_recv handler_operation, void *user, BPendingGroup *pg)
{
ASSERT(mtu >= 0)
// init arguments
i->mtu = mtu;
i->handler_operation = handler_operation;
i->user_provider = user;
// set no user
i->handler_done = NULL;
// init jobs
BPending_Init(&i->job_operation, pg, (BPending_handler)_PacketRecvInterface_job_operation, i);
BPending_Init(&i->job_done, pg, (BPending_handler)_PacketRecvInterface_job_done, i);
// set state
i->state = PRI_STATE_NONE;
DebugObject_Init(&i->d_obj);
}
void PacketRecvInterface_Free (PacketRecvInterface *i)
{
DebugObject_Free(&i->d_obj);
// free jobs
BPending_Free(&i->job_done);
BPending_Free(&i->job_operation);
}
void PacketRecvInterface_Done (PacketRecvInterface *i, int data_len)
{
ASSERT(data_len >= 0)
ASSERT(data_len <= i->mtu)
ASSERT(i->state == PRI_STATE_BUSY)
DebugObject_Access(&i->d_obj);
// schedule done
i->job_done_len = data_len;
BPending_Set(&i->job_done);
// set state
i->state = PRI_STATE_DONE_PENDING;
}
int PacketRecvInterface_GetMTU (PacketRecvInterface *i)
{
DebugObject_Access(&i->d_obj);
return i->mtu;
}
void PacketRecvInterface_Receiver_Init (PacketRecvInterface *i, PacketRecvInterface_handler_done handler_done, void *user)
{
ASSERT(handler_done)
ASSERT(!i->handler_done)
DebugObject_Access(&i->d_obj);
i->handler_done = handler_done;
i->user_user = user;
}
void PacketRecvInterface_Receiver_Recv (PacketRecvInterface *i, uint8_t *data)
{
ASSERT(!(i->mtu > 0) || data)
ASSERT(i->state == PRI_STATE_NONE)
ASSERT(i->handler_done)
DebugObject_Access(&i->d_obj);
// schedule operation
i->job_operation_data = data;
BPending_Set(&i->job_operation);
// set state
i->state = PRI_STATE_OPERATION_PENDING;
}
#endif

View File

@@ -0,0 +1,111 @@
/**
* @file PacketStreamSender.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include "misc/debug.h"
#include "flow/PacketStreamSender.h"
static void send_data (PacketStreamSender *s)
{
ASSERT(s->in_len >= 0)
if (s->in_used < s->in_len) {
// send more data
StreamPassInterface_Sender_Send(s->output, s->in + s->in_used, s->in_len - s->in_used);
} else {
// finish input packet
s->in_len = -1;
PacketPassInterface_Done(&s->input);
}
}
static void input_handler_send (PacketStreamSender *s, uint8_t *data, int data_len)
{
ASSERT(s->in_len == -1)
ASSERT(data_len >= 0)
DebugObject_Access(&s->d_obj);
// set input packet
s->in_len = data_len;
s->in = data;
s->in_used = 0;
// send
send_data(s);
}
static void output_handler_done (PacketStreamSender *s, int data_len)
{
ASSERT(s->in_len >= 0)
ASSERT(data_len > 0)
ASSERT(data_len <= s->in_len - s->in_used)
DebugObject_Access(&s->d_obj);
// update number of bytes sent
s->in_used += data_len;
// send
send_data(s);
}
void PacketStreamSender_Init (PacketStreamSender *s, StreamPassInterface *output, int mtu, BPendingGroup *pg)
{
ASSERT(mtu >= 0)
// init arguments
s->output = output;
// init input
PacketPassInterface_Init(&s->input, mtu, (PacketPassInterface_handler_send)input_handler_send, s, pg);
// init output
StreamPassInterface_Sender_Init(s->output, (StreamPassInterface_handler_done)output_handler_done, s);
// have no input packet
s->in_len = -1;
DebugObject_Init(&s->d_obj);
}
void PacketStreamSender_Free (PacketStreamSender *s)
{
DebugObject_Free(&s->d_obj);
// free input
PacketPassInterface_Free(&s->input);
}
PacketPassInterface * PacketStreamSender_GetInput (PacketStreamSender *s)
{
DebugObject_Access(&s->d_obj);
return &s->input;
}

View File

@@ -0,0 +1,83 @@
/**
* @file PacketStreamSender.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Object which forwards packets obtained with {@link PacketPassInterface}
* as a stream with {@link StreamPassInterface} (i.e. it concatenates them).
*/
#ifndef BADVPN_FLOW_PACKETSTREAMSENDER_H
#define BADVPN_FLOW_PACKETSTREAMSENDER_H
#include <stdint.h>
#include "base/DebugObject.h"
#include "flow/PacketPassInterface.h"
#include "flow/StreamPassInterface.h"
/**
* Object which forwards packets obtained with {@link PacketPassInterface}
* as a stream with {@link StreamPassInterface} (i.e. it concatenates them).
*/
typedef struct {
DebugObject d_obj;
PacketPassInterface input;
StreamPassInterface *output;
int in_len;
uint8_t *in;
int in_used;
} PacketStreamSender;
/**
* Initializes the object.
*
* @param s the object
* @param output output interface
* @param mtu input MTU. Must be >=0.
* @param pg pending group
*/
void PacketStreamSender_Init (PacketStreamSender *s, StreamPassInterface *output, int mtu, BPendingGroup *pg);
/**
* Frees the object.
*
* @param s the object
*/
void PacketStreamSender_Free (PacketStreamSender *s);
/**
* Returns the input interface.
* Its MTU will be as in {@link PacketStreamSender_Init}.
*
* @param s the object
* @return input interface
*/
PacketPassInterface * PacketStreamSender_GetInput (PacketStreamSender *s);
#endif

View File

@@ -0,0 +1,87 @@
/**
* @file SinglePacketBuffer.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include "misc/debug.h"
#include "misc/balloc.h"
#include "flow/SinglePacketBuffer.h"
static void input_handler_done (SinglePacketBuffer *o, int in_len)
{
DebugObject_Access(&o->d_obj);
PacketPassInterface_Sender_Send(o->output, o->buf, in_len);
}
static void output_handler_done (SinglePacketBuffer *o)
{
DebugObject_Access(&o->d_obj);
PacketRecvInterface_Receiver_Recv(o->input, o->buf);
}
int SinglePacketBuffer_Init (SinglePacketBuffer *o, PacketRecvInterface *input, PacketPassInterface *output, BPendingGroup *pg)
{
ASSERT(PacketPassInterface_GetMTU(output) >= PacketRecvInterface_GetMTU(input))
// init arguments
o->input = input;
o->output = output;
// init input
PacketRecvInterface_Receiver_Init(o->input, (PacketRecvInterface_handler_done)input_handler_done, o);
// init output
PacketPassInterface_Sender_Init(o->output, (PacketPassInterface_handler_done)output_handler_done, o);
// init buffer
if (!(o->buf = (uint8_t *)BAlloc(PacketRecvInterface_GetMTU(o->input)))) {
goto fail1;
}
// schedule receive
PacketRecvInterface_Receiver_Recv(o->input, o->buf);
DebugObject_Init(&o->d_obj);
return 1;
fail1:
return 0;
}
void SinglePacketBuffer_Free (SinglePacketBuffer *o)
{
DebugObject_Free(&o->d_obj);
// free buffer
BFree(o->buf);
}

View File

@@ -0,0 +1,75 @@
/**
* @file SinglePacketBuffer.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Packet buffer with {@link PacketRecvInterface} input and {@link PacketPassInterface} output
* than can store only a single packet.
*/
#ifndef BADVPN_FLOW_SINGLEPACKETBUFFER_H
#define BADVPN_FLOW_SINGLEPACKETBUFFER_H
#include <stdint.h>
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "flow/PacketRecvInterface.h"
#include "flow/PacketPassInterface.h"
/**
* Packet buffer with {@link PacketRecvInterface} input and {@link PacketPassInterface} output
* than can store only a single packet.
*/
typedef struct {
DebugObject d_obj;
PacketRecvInterface *input;
PacketPassInterface *output;
uint8_t *buf;
} SinglePacketBuffer;
/**
* Initializes the object.
* Output MTU must be >= input MTU.
*
* @param o the object
* @param input input interface
* @param output output interface
* @param pg pending group
* @return 1 on success, 0 on failure
*/
int SinglePacketBuffer_Init (SinglePacketBuffer *o, PacketRecvInterface *input, PacketPassInterface *output, BPendingGroup *pg) WARN_UNUSED;
/**
* Frees the object
*
* @param o the object
*/
void SinglePacketBuffer_Free (SinglePacketBuffer *o);
#endif

View File

@@ -0,0 +1,56 @@
/**
* @file StreamPassInterface.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "flow/StreamPassInterface.h"
void _StreamPassInterface_job_operation (StreamPassInterface *i)
{
ASSERT(i->state == SPI_STATE_OPERATION_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = SPI_STATE_BUSY;
// call handler
i->handler_operation(i->user_provider, i->job_operation_data, i->job_operation_len);
return;
}
void _StreamPassInterface_job_done (StreamPassInterface *i)
{
ASSERT(i->state == SPI_STATE_DONE_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = SPI_STATE_NONE;
// call handler
i->handler_done(i->user_user, i->job_done_len);
return;
}

View File

@@ -0,0 +1,165 @@
/**
* @file StreamPassInterface.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Interface allowing a stream sender to pass stream data to a stream receiver.
*
* Note that this interface behaves exactly the same and has the same code as
* {@link StreamRecvInterface} if names and its external semantics are disregarded.
* If you modify this file, you should probably modify {@link StreamRecvInterface}
* too.
*/
#ifndef BADVPN_FLOW_STREAMPASSINTERFACE_H
#define BADVPN_FLOW_STREAMPASSINTERFACE_H
#include <stdint.h>
#include <stddef.h>
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "base/BPending.h"
#define SPI_STATE_NONE 1
#define SPI_STATE_OPERATION_PENDING 2
#define SPI_STATE_BUSY 3
#define SPI_STATE_DONE_PENDING 4
typedef void (*StreamPassInterface_handler_send) (void *user, uint8_t *data, int data_len);
typedef void (*StreamPassInterface_handler_done) (void *user, int data_len);
typedef struct {
// provider data
StreamPassInterface_handler_send handler_operation;
void *user_provider;
// user data
StreamPassInterface_handler_done handler_done;
void *user_user;
// operation job
BPending job_operation;
uint8_t *job_operation_data;
int job_operation_len;
// done job
BPending job_done;
int job_done_len;
// state
int state;
DebugObject d_obj;
} StreamPassInterface;
static void StreamPassInterface_Init (StreamPassInterface *i, StreamPassInterface_handler_send handler_operation, void *user, BPendingGroup *pg);
static void StreamPassInterface_Free (StreamPassInterface *i);
static void StreamPassInterface_Done (StreamPassInterface *i, int data_len);
static void StreamPassInterface_Sender_Init (StreamPassInterface *i, StreamPassInterface_handler_done handler_done, void *user);
static void StreamPassInterface_Sender_Send (StreamPassInterface *i, uint8_t *data, int data_len);
void _StreamPassInterface_job_operation (StreamPassInterface *i);
void _StreamPassInterface_job_done (StreamPassInterface *i);
void StreamPassInterface_Init (StreamPassInterface *i, StreamPassInterface_handler_send handler_operation, void *user, BPendingGroup *pg)
{
// init arguments
i->handler_operation = handler_operation;
i->user_provider = user;
// set no user
i->handler_done = NULL;
// init jobs
BPending_Init(&i->job_operation, pg, (BPending_handler)_StreamPassInterface_job_operation, i);
BPending_Init(&i->job_done, pg, (BPending_handler)_StreamPassInterface_job_done, i);
// set state
i->state = SPI_STATE_NONE;
DebugObject_Init(&i->d_obj);
}
void StreamPassInterface_Free (StreamPassInterface *i)
{
DebugObject_Free(&i->d_obj);
// free jobs
BPending_Free(&i->job_done);
BPending_Free(&i->job_operation);
}
void StreamPassInterface_Done (StreamPassInterface *i, int data_len)
{
ASSERT(i->state == SPI_STATE_BUSY)
ASSERT(data_len > 0)
ASSERT(data_len <= i->job_operation_len)
DebugObject_Access(&i->d_obj);
// schedule done
i->job_done_len = data_len;
BPending_Set(&i->job_done);
// set state
i->state = SPI_STATE_DONE_PENDING;
}
void StreamPassInterface_Sender_Init (StreamPassInterface *i, StreamPassInterface_handler_done handler_done, void *user)
{
ASSERT(handler_done)
ASSERT(!i->handler_done)
DebugObject_Access(&i->d_obj);
i->handler_done = handler_done;
i->user_user = user;
}
void StreamPassInterface_Sender_Send (StreamPassInterface *i, uint8_t *data, int data_len)
{
ASSERT(data_len > 0)
ASSERT(data)
ASSERT(i->state == SPI_STATE_NONE)
ASSERT(i->handler_done)
DebugObject_Access(&i->d_obj);
// schedule operation
i->job_operation_data = data;
i->job_operation_len = data_len;
BPending_Set(&i->job_operation);
// set state
i->state = SPI_STATE_OPERATION_PENDING;
}
#endif

View File

@@ -0,0 +1,56 @@
/**
* @file StreamRecvInterface.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "flow/StreamRecvInterface.h"
void _StreamRecvInterface_job_operation (StreamRecvInterface *i)
{
ASSERT(i->state == SRI_STATE_OPERATION_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = SRI_STATE_BUSY;
// call handler
i->handler_operation(i->user_provider, i->job_operation_data, i->job_operation_len);
return;
}
void _StreamRecvInterface_job_done (StreamRecvInterface *i)
{
ASSERT(i->state == SRI_STATE_DONE_PENDING)
DebugObject_Access(&i->d_obj);
// set state
i->state = SRI_STATE_NONE;
// call handler
i->handler_done(i->user_user, i->job_done_len);
return;
}

View File

@@ -0,0 +1,165 @@
/**
* @file StreamRecvInterface.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* Interface allowing a stream receiver to receive stream data from a stream sender.
*
* Note that this interface behaves exactly the same and has the same code as
* {@link StreamPassInterface} if names and its external semantics are disregarded.
* If you modify this file, you should probably modify {@link StreamPassInterface}
* too.
*/
#ifndef BADVPN_FLOW_STREAMRECVINTERFACE_H
#define BADVPN_FLOW_STREAMRECVINTERFACE_H
#include <stdint.h>
#include <stddef.h>
#include "misc/debug.h"
#include "base/DebugObject.h"
#include "base/BPending.h"
#define SRI_STATE_NONE 1
#define SRI_STATE_OPERATION_PENDING 2
#define SRI_STATE_BUSY 3
#define SRI_STATE_DONE_PENDING 4
typedef void (*StreamRecvInterface_handler_recv) (void *user, uint8_t *data, int data_len);
typedef void (*StreamRecvInterface_handler_done) (void *user, int data_len);
typedef struct {
// provider data
StreamRecvInterface_handler_recv handler_operation;
void *user_provider;
// user data
StreamRecvInterface_handler_done handler_done;
void *user_user;
// operation job
BPending job_operation;
uint8_t *job_operation_data;
int job_operation_len;
// done job
BPending job_done;
int job_done_len;
// state
int state;
DebugObject d_obj;
} StreamRecvInterface;
static void StreamRecvInterface_Init (StreamRecvInterface *i, StreamRecvInterface_handler_recv handler_operation, void *user, BPendingGroup *pg);
static void StreamRecvInterface_Free (StreamRecvInterface *i);
static void StreamRecvInterface_Done (StreamRecvInterface *i, int data_len);
static void StreamRecvInterface_Receiver_Init (StreamRecvInterface *i, StreamRecvInterface_handler_done handler_done, void *user);
static void StreamRecvInterface_Receiver_Recv (StreamRecvInterface *i, uint8_t *data, int data_len);
void _StreamRecvInterface_job_operation (StreamRecvInterface *i);
void _StreamRecvInterface_job_done (StreamRecvInterface *i);
void StreamRecvInterface_Init (StreamRecvInterface *i, StreamRecvInterface_handler_recv handler_operation, void *user, BPendingGroup *pg)
{
// init arguments
i->handler_operation = handler_operation;
i->user_provider = user;
// set no user
i->handler_done = NULL;
// init jobs
BPending_Init(&i->job_operation, pg, (BPending_handler)_StreamRecvInterface_job_operation, i);
BPending_Init(&i->job_done, pg, (BPending_handler)_StreamRecvInterface_job_done, i);
// set state
i->state = SRI_STATE_NONE;
DebugObject_Init(&i->d_obj);
}
void StreamRecvInterface_Free (StreamRecvInterface *i)
{
DebugObject_Free(&i->d_obj);
// free jobs
BPending_Free(&i->job_done);
BPending_Free(&i->job_operation);
}
void StreamRecvInterface_Done (StreamRecvInterface *i, int data_len)
{
ASSERT(i->state == SRI_STATE_BUSY)
ASSERT(data_len > 0)
ASSERT(data_len <= i->job_operation_len)
DebugObject_Access(&i->d_obj);
// schedule done
i->job_done_len = data_len;
BPending_Set(&i->job_done);
// set state
i->state = SRI_STATE_DONE_PENDING;
}
void StreamRecvInterface_Receiver_Init (StreamRecvInterface *i, StreamRecvInterface_handler_done handler_done, void *user)
{
ASSERT(handler_done)
ASSERT(!i->handler_done)
DebugObject_Access(&i->d_obj);
i->handler_done = handler_done;
i->user_user = user;
}
void StreamRecvInterface_Receiver_Recv (StreamRecvInterface *i, uint8_t *data, int data_len)
{
ASSERT(data_len > 0)
ASSERT(data)
ASSERT(i->state == SRI_STATE_NONE)
ASSERT(i->handler_done)
DebugObject_Access(&i->d_obj);
// schedule operation
i->job_operation_data = data;
i->job_operation_len = data_len;
BPending_Set(&i->job_operation);
// set state
i->state = SRI_STATE_OPERATION_PENDING;
}
#endif

View File

@@ -0,0 +1,131 @@
/**
* @file PacketPassInactivityMonitor.c
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "PacketPassInactivityMonitor.h"
static void input_handler_send (PacketPassInactivityMonitor *o, uint8_t *data, int data_len)
{
DebugObject_Access(&o->d_obj);
// schedule send
PacketPassInterface_Sender_Send(o->output, data, data_len);
// stop timer
BReactor_RemoveTimer(o->reactor, &o->timer);
}
static void input_handler_requestcancel (PacketPassInactivityMonitor *o)
{
DebugObject_Access(&o->d_obj);
// request cancel
PacketPassInterface_Sender_RequestCancel(o->output);
}
static void output_handler_done (PacketPassInactivityMonitor *o)
{
DebugObject_Access(&o->d_obj);
// output no longer busy, restart timer
BReactor_SetTimer(o->reactor, &o->timer);
// call done
PacketPassInterface_Done(&o->input);
}
static void timer_handler (PacketPassInactivityMonitor *o)
{
DebugObject_Access(&o->d_obj);
// restart timer
BReactor_SetTimer(o->reactor, &o->timer);
// call handler
if (o->handler) {
o->handler(o->user);
return;
}
}
void PacketPassInactivityMonitor_Init (PacketPassInactivityMonitor *o, PacketPassInterface *output, BReactor *reactor, btime_t interval, PacketPassInactivityMonitor_handler handler, void *user)
{
// init arguments
o->output = output;
o->reactor = reactor;
o->handler = handler;
o->user = user;
// init input
PacketPassInterface_Init(&o->input, PacketPassInterface_GetMTU(o->output), (PacketPassInterface_handler_send)input_handler_send, o, BReactor_PendingGroup(o->reactor));
if (PacketPassInterface_HasCancel(o->output)) {
PacketPassInterface_EnableCancel(&o->input, (PacketPassInterface_handler_requestcancel)input_handler_requestcancel);
}
// init output
PacketPassInterface_Sender_Init(o->output, (PacketPassInterface_handler_done)output_handler_done, o);
// init timer
BTimer_Init(&o->timer, interval, (BTimer_handler)timer_handler, o);
BReactor_SetTimer(o->reactor, &o->timer);
DebugObject_Init(&o->d_obj);
}
void PacketPassInactivityMonitor_Free (PacketPassInactivityMonitor *o)
{
DebugObject_Free(&o->d_obj);
// free timer
BReactor_RemoveTimer(o->reactor, &o->timer);
// free input
PacketPassInterface_Free(&o->input);
}
PacketPassInterface * PacketPassInactivityMonitor_GetInput (PacketPassInactivityMonitor *o)
{
DebugObject_Access(&o->d_obj);
return &o->input;
}
void PacketPassInactivityMonitor_SetHandler (PacketPassInactivityMonitor *o, PacketPassInactivityMonitor_handler handler, void *user)
{
DebugObject_Access(&o->d_obj);
o->handler = handler;
o->user = user;
}
void PacketPassInactivityMonitor_Force (PacketPassInactivityMonitor *o)
{
DebugObject_Access(&o->d_obj);
BReactor_SetTimerAfter(o->reactor, &o->timer, 0);
}

View File

@@ -0,0 +1,124 @@
/**
* @file PacketPassInactivityMonitor.h
* @author Ambroz Bizjak <ambrop7@gmail.com>
*
* @section LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
*
* A {@link PacketPassInterface} layer for detecting inactivity.
*/
#ifndef BADVPN_PACKETPASSINACTIVITYMONITOR_H
#define BADVPN_PACKETPASSINACTIVITYMONITOR_H
#include "base/DebugObject.h"
#include "system/BReactor.h"
#include "flow/PacketPassInterface.h"
/**
* Handler function invoked when inactivity is detected.
* It is guaranteed that the interfaces are in not sending state.
*
* @param user value given to {@link PacketPassInactivityMonitor_Init}
*/
typedef void (*PacketPassInactivityMonitor_handler) (void *user);
/**
* A {@link PacketPassInterface} layer for detecting inactivity.
* It reports inactivity to a user provided handler function.
*
* The object behaves like that:
* ("timer set" means started with the given timeout whether if was running or not,
* "timer unset" means stopped if it was running)
* - There is a timer.
* - The timer is set when the object is initialized.
* - When the input calls Send, the call is passed on to the output.
* If the output accepted the packet, the timer is set. If the output
* blocked the packet, the timer is unset.
* - When the output calls Done, the timer is set, and the call is
* passed on to the input.
* - When the input calls Cancel, the timer is set, and the call is
* passed on to the output.
* - When the timer expires, the timer is set, ant the user's handler
* function is invoked.
*/
typedef struct {
DebugObject d_obj;
PacketPassInterface *output;
BReactor *reactor;
PacketPassInactivityMonitor_handler handler;
void *user;
PacketPassInterface input;
BTimer timer;
} PacketPassInactivityMonitor;
/**
* Initializes the object.
* See {@link PacketPassInactivityMonitor} for details.
*
* @param o the object
* @param output output interface
* @param reactor reactor we live in
* @param interval timer value in milliseconds
* @param handler handler function for reporting inactivity, or NULL to disable
* @param user value passed to handler functions
*/
void PacketPassInactivityMonitor_Init (PacketPassInactivityMonitor *o, PacketPassInterface *output, BReactor *reactor, btime_t interval, PacketPassInactivityMonitor_handler handler, void *user);
/**
* Frees the object.
*
* @param o the object
*/
void PacketPassInactivityMonitor_Free (PacketPassInactivityMonitor *o);
/**
* Returns the input interface.
* The MTU of the interface will be the same as of the output interface.
* The interface supports cancel functionality if the output interface supports it.
*
* @param o the object
* @return input interface
*/
PacketPassInterface * PacketPassInactivityMonitor_GetInput (PacketPassInactivityMonitor *o);
/**
* Sets or removes the inactivity handler.
*
* @param o the object
* @param handler handler function for reporting inactivity, or NULL to disable
* @param user value passed to handler functions
*/
void PacketPassInactivityMonitor_SetHandler (PacketPassInactivityMonitor *o, PacketPassInactivityMonitor_handler handler, void *user);
/**
* Sets the timer to expire immediately in order to force an inactivity report.
*
* @param o the object
*/
void PacketPassInactivityMonitor_Force (PacketPassInactivityMonitor *o);
#endif

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BArpProbe

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BConnection

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BDHCPClient

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BDHCPClientCore

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BDatagram

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BEncryption

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BInputProcess

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BLockReactor

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BNetwork

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BPredicate

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BProcess

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BReactor

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BSSLConnection

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BSignal

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BSocksClient

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BTap

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BThreadSignal

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BThreadWork

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BTime

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_BUnixSignal

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_DPReceive

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_DPRelay

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_DataProto

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_DatagramPeerIO

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_FragmentProtoAssembler

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_FrameDecider

View File

@@ -0,0 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_LineBuffer

Some files were not shown because too many files have changed in this diff Show More