Commit Graph

170 Commits

Author SHA1 Message Date
Jonathan Senkerik 441a0d69ed
Refactor logging, add cache-size, fs-event-log (#163)
Much appreciated! Merged. :)
2026-02-27 08:38:28 +01:00
Levi Neely b9ea6ca4c9 Remove unused psync_status_file/folder wrappers
- Both functions were pure aliases to psync_filesystem_status()
- Never called anywhere in the codebase
- Simplified API documentation to reference only psync_filesystem_status()
2026-02-14 20:08:01 +01:00
Levi Neely 2c5e32e910 Fix #95: Remove unused get_token() wrapper from pclsync_lib
- Eliminates thin wrapper that just called psync_get_token()
- Function was declared but never used
- Simplifies pclsync_lib API as per issue #95
2026-02-14 20:08:01 +01:00
Levi Neely 11074655db Fix #8: Add pending transfer check feature
- Add new 'pending' command (alias 'p') to check for pending transfers
- Enhance 'finalize' command to warn about pending transfers
- Prompt for confirmation in interactive mode before shutdown
- Use psync_get_status() API for reliable transfer detection
- Shows upload/download counts separately
- Fix mbedtls 3.6 compatibility issues in pssl.c
- Update Makefile for mbedtls 3.x static linking
2026-02-14 19:43:13 +01:00
Levi Neely e566c7822a Fix #107: Add SMS 2FA support
- Enhance read_tfa_code() to offer SMS option
- User can type 'sms' to receive code via SMS
- Display phone number when SMS is sent
- Falls back to authenticator app if SMS fails
- Uses existing psync_tfa_send_sms() API
2026-02-14 19:20:10 +01:00
Levi 0a14098935 arm64 arch devhost 2025-07-20 16:01:47 +02:00
Levi Neely a11575b9da
fix compile errors (#155) 2025-05-15 19:14:57 +02:00
ahuemmer 95cbf63a57
fix: add stdlib to fix build (#153) 2025-04-20 22:41:33 +02:00
Levi Neely 6540e14732
move folder-related code from psynclib to pfolder 2025-04-18 15:23:50 +02:00
Levi Neely 1dd703142d
Merge branch 'nix-shell' [#151] 2025-04-18 13:29:37 +02:00
Levi Neely 2df5ef876f
add watchexec to dev shell 2025-04-18 11:32:16 +02:00
kost a4b92682ba
Musl fixes (#143)
* use libunwind where glibc is not available

* use sys/stat.h for struct stat definition
2025-04-13 09:11:11 +02:00
Levi Neely 9842c90f89
direnv (#150)
* enable direnv for dev shell
2025-04-13 08:53:41 +02:00
Levi Neely 376fbfffc9
Merge branch 'main' into nix-shell 2025-04-13 08:52:37 +02:00
Levi Neely 0ce5713f0f enable direnv for dev shell 2025-04-13 08:47:23 +02:00
Levi Neely 3dfb8de927
Nix shell uses flakes (#147)
* nix shell now uses flakes
2025-04-11 20:55:58 +02:00
Levi Neely 1ae036c032 nix shell now uses flakes 2025-04-11 20:54:28 +02:00
Levi Neely 1938924218 Merge branch 'main' into nix-shell 2025-04-11 20:54:08 +02:00
Levi Neely 1e2d16cb7f
nix dev shell (#146) 2025-04-11 00:44:35 +02:00
Levi Neely 87bbab2d06 nix dev shell 2025-04-11 00:41:26 +02:00
Levi Neely cf818e539e
Update README.md (#145) 2025-04-08 14:45:08 +02:00
Levi Neely 9087e5d3ac
update devscripts, new arch devhost (#144) 2025-04-06 23:01:31 +02:00
V10lator bd576e3c5b
Allow custom flags (#141)
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-03-18 19:55:15 +01:00
Levi Neely 6994a3cac9
102 create a psql namespace (#142)
* another stupid macro gone

* more stupid macros gone. moved util functions from plibs to putil

* remaining plist and ptask functions moved to appropriate namespaces

* dead code beleted!

* bugfixes

* move sql functions to psql.c

* move sort functions into ppagecache

* psql namespace

* change plibs.h include to pdbg.h

* cleanup includes
2025-03-18 19:52:15 +01:00
Levi Neely 58461232db
fix weird name (#140) 2025-03-13 20:44:42 +01:00
Levi Neely 9014edb99a
98 create a pdbg namespace (#139)
* pdbg split from plibs
* pdbg namespace
* add SSLDBGLVL build option
2025-03-13 20:28:09 +01:00
Levi Neely 9da561c767
131 remove custom memory management wrappers (#137)
* psync_free removed

* psync_malloc removed

* psync_realloc removed

* remove dead code

* remove pmemlock

* remove dead code
2025-03-11 22:27:30 +01:00
Levi Neely 3fd249f3f8
manual formatting (#136) 2025-03-11 21:36:26 +01:00
Levi Neely 3e177864ec
use process_command in process_commands (#135) 2025-03-11 20:49:22 +01:00
Levi Neely ce6033fe95
130 use trustworthy location for log and socket (#134)
* trustworthy location for log and socket
- socket in => $HOME/.pcloud/prpc.sock (mode 0600)
- debug log => $HOME/.pcloud/debug.log
* documentation updates
2025-03-11 19:03:58 +01:00
Levi Neely 79141898c3
84 security enhancements (#133)
- DoD 5220.22-M compliant memory wipe replaces single-pass zero wipe
- Wipe in-memory request and response messages before freeing
- Wipe in-memory private keys and salt data before freeing
- Wipe all passwords on unlink / logout
- Wipe crypto password on all pcryptofolder_unlock return paths
2025-03-11 15:05:43 +01:00
Levi Neely 3c713d6437
remove version check and download code (#127) 2025-03-09 20:36:25 +01:00
Levi Neely 28b985649f
rpcclient is now part of the CLI program (#126) 2025-03-09 20:20:33 +01:00
Levi Neely d3bea1c641
access pcryptofolder directly from pclsync_lib (#125)
* access pcryptofolder directly from pclsync_lib
* move issetup to pcryptofolder
2025-03-09 19:58:00 +01:00
Levi Neely 43521f603c
resolve cmd ambiguity, just support pipe input (#124) 2025-03-09 19:25:34 +01:00
Levi Neely 27977765e8
non interactive command processing (#123)
* support non-interactive command processing
- app is now configured in setup_app function
- added process_command() to api
- support piped input and -c argument
- fix memleaks
2025-03-09 19:18:38 +01:00
Levi Neely f437fe840e
prpc namespace and api cleanup (#122)
* prpc namespace and api cleanup
2025-03-09 17:13:35 +01:00
Levi Neely 8db64e8a4a
pssl namespace decomposition, remove compat junk (#121) 2025-03-09 16:39:30 +01:00
Levi Neely f266351e55
Update README.md (#119) 2025-03-09 15:34:16 +01:00
Levi Neely 826c2e3edf
upgrade to mbedtls 3.x (#118)
Migrate mbedtls 2.x to mbedtls 3.x.
2025-03-09 15:16:46 +01:00
Levi Neely eb04ac246a
Fix deprecated function and write() warnings (#117)
* add readline to dev containers

* pssl function names

* fix deprecated function warnings

* fix more deprecated function warnings

* fix warnings on write()
2025-03-09 09:45:45 +01:00
Levi Neely 8ad1fe6086
Code cleanup and readline for better CLI UX (#116)
* pcommands.h for command ids

* remove compiler compat junk

* transient and unnecessary includes resolved

* unnecessary goto

* function naming and whatnot

* use readline for better command line UX

* add readline to CI workflow
2025-03-09 09:14:12 +01:00
Levi Neely 85e9eb3e77
forgot to remove a debug print (#115) 2025-03-08 14:07:39 +01:00
Levi Neely bc5452fc0a
Revert mbedtls3 migration (#114)
* Revert "migrate mbedtls to 3.x (#89)"

This reverts commit f87367211d.

* prevent multiple execution of psync_fs_do_sotp and use atexit in sig hnd

* remove debug.[ch] in favor of plibs debug

* eliminate pcompat

* Decompose namespaces and other cleanup

* add missing unistd.h to psys.c (#113)

* remove useless comment
2025-03-08 12:49:33 +01:00
Levi Neely 75e0d476bb
add missing unistd.h to psys.c (#113) 2025-03-06 21:08:37 +01:00
Levi Neely 1106028eba
WIP: Decompose namespaces and other cleanup (#94)
* papi namespace, remove some transient dependencies

* ptask namespace and cleanup

* pcache namespace and cleanup

* refactor pcallbacks into pqevent and ptevent

* pcryptofolder namespace and cleanup

* pcryptofolder missed a rename

* pdeflate namespace and cleanup

* pcrypto namespace

* pcrypto cleanup

* pcrypto consistency

* pcrypto more consistency

* pdevmon namespace and cleanup

* pdiff namespace

* pdownload namespace and cleanup

* pstatus namespace and cleanup

* pfileops namespace, fix header inlining abuse

* pfoldersync API, start chipping away at the psynclib monster

* pfscrypto namespace

* plocks namespace

* pnotify namespace

* pnotify formatting

* prpc namespace (got rid of confusing "overlay")

* pp2p namespace and cleanup

* ppagecache namespace

* ppassword namespace

* ppathstatus namespace

* prunratelimited => prun with throttling

* pscanner.c => psuggest namespace

* ptimer namespace

* ptools namespace (move to putil namespace someday)

* ptree namespace

* moved public link definitions into publiclinks.h, no clear namespace here though...

* pupload namespace

* formatting

* pcrc32c namespace
2025-03-01 22:21:54 +01:00
Levi Neely 2b6508a275
eliminate pcompat (#92)
* code cleanup and removal
- remove useless wrapper functions
- remove obfuscating typedefs
- code reorganization and reformatting
- function renames for clarification

* prepare pcompat.h for decomposition

* remove dead function psync_rebuild_icons, reorganize pfsstatic.c headers

* separate pdevice from pcompat

* reorg function prototypes, remove more compat stuff

* renamed mutex for brevity

* remove dead debug code; plibs version is more sophisticated

* remove dead code, stale comments

* moved psync_delete_cached_crypto_keys to psynclib

* forgot to remove the function prototype from pdiff.h

* reorganized functions by accessibility, inlined useless psync_cache_contacts function

* remove unused header

* ppath object decomposed from pcompat

* ppath namespace

* ppath struct renames

* ppath final cleanup

* refactor, remove compatibility code

* format

* prun decomposed from pcompat for thread mgmt

* slim down prun.c

* remove useless comments

* move pagesize to pmemlock, pmemlock namespace

* pmem decomposed from pcompat, pmem namespace

* decompose psys from pcompat

* fix psys function names, remove more compatibility junk

* prand decomposed from pcompat

* psock decomposed from pcompat

* types renamed for ns consistency, brevity

* cleanup psock, remove unused proxy code

* remove unused headers psock

* putil for utility macros and functions

* forgot to move some psock constants

* move time macro to psys

* eliminate pcompat completely; new pfile namespace

* cleanup
- moved thread name definition
- explicit externs in implementation instead of headers for now
- better extern name
2025-02-28 22:47:32 +01:00
Levi Neely c04f887249
prevent multiple execution of psync_fs_do_stop, and use atexit in the signal handler (#91) 2025-02-26 20:31:25 +01:00
Levi Neely f87367211d
migrate mbedtls to 3.x (#89)
* migrate mbedtls to 3.x

* update github c-cpp workflow to use trixie

* update README and container-build
- default image and tag for container-build is now debian:trixie
- README for debian bookworm users

* final readme tweaks

* second attempt to update ci build workflow

* third attempt on ci build workflow

* fix deprecated calls in pssl.c
2025-02-26 19:18:01 +01:00
Levi Neely 5ecece7547
#64 simplify messaging and #71 deserialize failed (#88)
* small lsp error fixes

* simplify messaging and remove serialize/deserialize
- messaging is reverted to API requests and responses only
- remove serialize and deserialize functions
- implement shared memory (pshm) for overlay callback return values

* fix memory leak

Fix #64 and #71
2025-02-25 09:46:46 +01:00