Commit ff20df1c authored by nextime's avatar nextime

Version 1.4.0: Complete wsssh-server Debian package implementation

- Added comprehensive wsssh-server Debian package for wssshd daemon
- Created wssshd man page with complete documentation
- Updated build.sh to support wsssh-server package building
- Enhanced --server-only option to build server components
- Updated all version references to 1.4.0
- Improved package separation between server and client components
- Added PyInstaller binary packaging for standalone deployment
- Integrated init scripts with proper user/group management
- Added comprehensive postinst/postrm scripts for system integration
- Created /etc/default configuration files for service control
- Enhanced Debian packaging with professional standards compliance
parent dd9e35c6
......@@ -5,6 +5,48 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4.0] - 2025-09-13
### Added
- **wsssh-server Debian Package**: Complete Debian package for wssshd daemon
- PyInstaller binary packaging for standalone deployment
- Comprehensive init script with wssshd user/group support
- Automatic user/group creation during installation
- Proper directory structure and permissions
- Integration with Debian init system and rc2.d
- /etc/default/wssshd configuration file
- Professional postinst/postrm scripts for system integration
- **wssshd Man Page**: Complete manual page for wssshd daemon
- Comprehensive command-line options documentation
- Configuration file format and examples
- Web interface usage instructions
- Security considerations and best practices
- Signal handling and troubleshooting information
- **Enhanced Build System**: Updated build.sh for wsssh-server package support
- --server-only option builds only wssshd and wsssh-server package
- Separate wsssh-server and wsssh-tools package building
- Improved dependency checking for Python and Debian build tools
- Better output formatting and package availability reporting
### Changed
- **Package Architecture**: Split into wsssh-server (daemon) and wsssh-tools (clients) packages
- **Build System**: Enhanced build.sh to support selective package building
- **Documentation**: Updated man pages and help text for new package structure
### Technical Details
- **Debian Packaging**: Professional multi-package Debian distribution
- **PyInstaller Integration**: Automated binary creation with dependency bundling
- **System Integration**: Complete init script and service management
- **Security**: Dedicated wssshd user/group with minimal privileges
- **Configuration**: Hierarchical configuration with /etc/default support
### Fixed
- **Package Separation**: Clean separation between server and client components
- **Build Dependencies**: Proper dependency checking and error reporting
- **Service Management**: Robust init script with proper error handling
## [1.3.4] - 2025-09-13
### Added
......
......@@ -50,17 +50,18 @@ while [[ $# -gt 0 ]]; do
--help|-h)
echo "Usage: $0 [options]"
echo "Options:"
echo " --debian Build Debian package"
echo " --debian-only Build only Debian package (skip binaries)"
echo " --server-only Build only the server (wssshd)"
echo " --no-server Skip building the server (wssshd)"
echo " --wssshtools-only Build only the C tools (wssshtools)"
echo " --debian Build Debian packages (wsssh-server and wsssh-tools)"
echo " --debian-only Build only Debian packages (skip binaries)"
echo " --server-only Build only the server (wssshd) and wsssh-server package"
echo " --no-server Skip building the server (wssshd) and wsssh-server package"
echo " --wssshtools-only Build only the C tools (wssshtools) and wsssh-tools package"
echo " --help, -h Show this help"
exit 0
;;
*)
echo "Unknown option: $1"
echo "Usage: $0 [--debian] [--debian-only] [--server-only] [--no-server] [--wssshtools-only]"
echo "Try '$0 --help' for more information."
exit 1
;;
esac
......@@ -172,7 +173,7 @@ if [ "$BUILD_DEBIAN" = true ]; then
# Check for required Debian build tools
missing_deps=""
for dep in debhelper gcc make pkg-config libssl-dev; do
for dep in debhelper gcc make pkg-config libssl-dev python3 python3-pip python3-setuptools; do
if ! dpkg -l | grep -q "^ii $dep"; then
missing_deps="$missing_deps $dep"
fi
......@@ -181,21 +182,41 @@ if [ "$BUILD_DEBIAN" = true ]; then
if [ -n "$missing_deps" ]; then
echo "Error: Missing Debian build dependencies:$missing_deps"
echo "Please install them with: sudo apt-get install$missing_deps"
echo "Or run: sudo apt-get install debhelper gcc make pkg-config libssl-dev"
echo "Or run: sudo apt-get install debhelper gcc make pkg-config libssl-dev python3 python3-pip python3-setuptools"
exit 1
fi
echo "All Debian build dependencies found."
echo "Building Debian package..."
echo "Building Debian packages..."
if [ -d "wssshtools" ] && [ -d "wssshtools/debian" ]; then
# Build wsssh-server package if it exists and not wssshtools-only
if [ "$BUILD_WSSSHTOOLS_ONLY" = false ] && [ -d "wsssh-server" ] && [ -d "wsssh-server/debian" ]; then
echo "Building wsssh-server Debian package..."
cd wsssh-server
dpkg-buildpackage -us -uc
cd ..
# Move deb file to dist
mv ../wsssh-server*.deb dist/ 2>/dev/null || true
echo "wsssh-server package built successfully."
fi
# Build wssshtools package if it exists and not server-only
if [ "$BUILD_SERVER_ONLY" = false ] && [ -d "wssshtools" ] && [ -d "wssshtools/debian" ]; then
echo "Building wsssh-tools Debian package..."
cd wssshtools
dpkg-buildpackage -us -uc
cd ..
# Move deb file to dist
mv ../wsssh-tools*.deb dist/ 2>/dev/null || true
else
echo "Warning: Debian packaging not available (missing wssshtools/debian/)"
echo "wsssh-tools package built successfully."
fi
if [ "$BUILD_SERVER_ONLY" = true ] && [ ! -d "wsssh-server" ]; then
echo "Warning: wsssh-server package not available (missing wsssh-server/ directory)"
fi
if [ "$BUILD_WSSSHTOOLS_ONLY" = true ] && [ ! -d "wssshtools" ]; then
echo "Warning: wsssh-tools package not available (missing wssshtools/ directory)"
fi
fi
......@@ -206,9 +227,12 @@ fi
if [ "$BUILD_DEBIAN_ONLY" = true ]; then
echo "Debian package build complete."
echo "Packages available in dist/ directory:"
if ls dist/wsssh-server*.deb >/dev/null 2>&1; then
echo "- dist/wsssh-server*.deb (wssshd server Debian package)"
fi
if ls dist/wsssh-tools*.deb >/dev/null 2>&1; then
echo "Package available in dist/ directory:"
echo "- dist/wsssh-tools*.deb (Debian package)"
echo "- dist/wsssh-tools*.deb (C tools Debian package)"
fi
elif [ "$BUILD_WSSSHTOOLS_ONLY" = true ]; then
echo "C tools build complete."
......@@ -218,6 +242,15 @@ elif [ "$BUILD_WSSSHTOOLS_ONLY" = true ]; then
echo "- wssshtools/wsssh (C SSH wrapper)"
echo "- wssshtools/wsscp (C SCP wrapper)"
fi
elif [ "$BUILD_SERVER_ONLY" = true ]; then
echo "Server-only build complete."
if [ "$BUILD_NO_SERVER" = false ]; then
echo "Server binary available in dist/ directory:"
echo "- dist/wssshd (server with web interface)"
fi
if [ "$BUILD_DEBIAN" = true ] && ls dist/wsssh-server*.deb >/dev/null 2>&1; then
echo "- dist/wsssh-server*.deb (wssshd server Debian package)"
fi
else
echo "Build complete. Binaries are in dist/ directory:"
......@@ -243,7 +276,13 @@ else
fi
fi
if [ "$BUILD_DEBIAN" = true ] && ls dist/wsssh-tools*.deb >/dev/null 2>&1; then
echo "- dist/wsssh-tools*.deb (Debian package)"
if [ "$BUILD_DEBIAN" = true ]; then
echo "Debian packages available in dist/ directory:"
if ls dist/wsssh-server*.deb >/dev/null 2>&1; then
echo "- dist/wsssh-server*.deb (wssshd server Debian package)"
fi
if ls dist/wsssh-tools*.deb >/dev/null 2>&1; then
echo "- dist/wsssh-tools*.deb (C tools Debian package)"
fi
fi
fi
\ No newline at end of file
logos/banner-800x200.png

52.7 KB | W: | H:

logos/banner-800x200.png

52.7 KB | W: | H:

logos/banner-800x200.png
logos/banner-800x200.png
logos/banner-800x200.png
logos/banner-800x200.png
  • 2-up
  • Swipe
  • Onion skin
logos/icon-128.png

23.2 KB | W: | H:

logos/icon-128.png

23.2 KB | W: | H:

logos/icon-128.png
logos/icon-128.png
logos/icon-128.png
logos/icon-128.png
  • 2-up
  • Swipe
  • Onion skin
logos/icon-16.png

2.34 KB | W: | H:

logos/icon-16.png

2.34 KB | W: | H:

logos/icon-16.png
logos/icon-16.png
logos/icon-16.png
logos/icon-16.png
  • 2-up
  • Swipe
  • Onion skin
logos/icon-256.png

84.6 KB | W: | H:

logos/icon-256.png

84.6 KB | W: | H:

logos/icon-256.png
logos/icon-256.png
logos/icon-256.png
logos/icon-256.png
  • 2-up
  • Swipe
  • Onion skin
logos/icon-32.png

3.24 KB | W: | H:

logos/icon-32.png

3.24 KB | W: | H:

logos/icon-32.png
logos/icon-32.png
logos/icon-32.png
logos/icon-32.png
  • 2-up
  • Swipe
  • Onion skin
logos/icon-48.png

4.91 KB | W: | H:

logos/icon-48.png

4.91 KB | W: | H:

logos/icon-48.png
logos/icon-48.png
logos/icon-48.png
logos/icon-48.png
  • 2-up
  • Swipe
  • Onion skin
logos/icon-64.png

7.23 KB | W: | H:

logos/icon-64.png

7.23 KB | W: | H:

logos/icon-64.png
logos/icon-64.png
logos/icon-64.png
logos/icon-64.png
  • 2-up
  • Swipe
  • Onion skin
logos/logo-128.png

23.2 KB | W: | H:

logos/logo-128.png

23.2 KB | W: | H:

logos/logo-128.png
logos/logo-128.png
logos/logo-128.png
logos/logo-128.png
  • 2-up
  • Swipe
  • Onion skin
logos/logo-256.png

84.6 KB | W: | H:

logos/logo-256.png

84.6 KB | W: | H:

logos/logo-256.png
logos/logo-256.png
logos/logo-256.png
logos/logo-256.png
  • 2-up
  • Swipe
  • Onion skin
logos/logo-512.png

307 KB | W: | H:

logos/logo-512.png

307 KB | W: | H:

logos/logo-512.png
logos/logo-512.png
logos/logo-512.png
logos/logo-512.png
  • 2-up
  • Swipe
  • Onion skin
logos/logo-64.png

7.23 KB | W: | H:

logos/logo-64.png

7.23 KB | W: | H:

logos/logo-64.png
logos/logo-64.png
logos/logo-64.png
logos/logo-64.png
  • 2-up
  • Swipe
  • Onion skin
wsssh-server (1.3.4-1) unstable; urgency=medium
wsssh-server (1.4.0-1) unstable; urgency=medium
* Initial release of wsssh-server Debian package
* Package wssshd as PyInstaller binary for easy deployment
* Include comprehensive init script with service management
* Create wssshd user and group for secure daemon operation
* Set up proper directory structure and permissions
* Integrate with Debian init system and rc2.d
* Include configuration examples and documentation
* New upstream release 1.4.0
* Add comprehensive man page for wssshd daemon
* Include wssshd.1 man page in package installation
* Enhanced documentation and usage examples
* Improved PyInstaller binary packaging
* Better integration with Debian packaging standards
-- Stefy Lanza <stefy@nexlab.net> Mon, 13 Sep 2025 19:17:00 +0200
\ No newline at end of file
-- Stefy Lanza <stefy@nexlab.net> Mon, 13 Sep 2025 19:21:00 +0200
\ No newline at end of file
......@@ -105,6 +105,9 @@ override_dh_auto_install:
install -m 644 debian/wssshd.default debian/wsssh-server/etc/default/wssshd
install -m 644 ../wssshd.conf.example debian/wsssh-server/usr/share/wsssh/
# Install man page
install -m 644 debian/wssshd.1 debian/wsssh-server/usr/share/man/man1/
# Install web templates and static files
mkdir -p debian/wsssh-server/usr/share/wsssh/templates
mkdir -p debian/wsssh-server/usr/share/wsssh/logos
......
.TH WSSSHD 1 "September 2025" "wsssh-server 1.4.0" "WebSocket SSH Server"
.SH NAME
wssshd \- WebSocket SSH Server daemon for secure tunneling
.SH SYNOPSIS
.B wssshd
[\fB\-\-config\fR \fIFILE\fR]
[\fB\-\-host\fR \fIHOST\fR]
[\fB\-\-port\fR \fIPORT\fR]
[\fB\-\-ssl\-cert\fR \fIFILE\fR]
[\fB\-\-ssl\-key\fR \fIFILE\fR]
[\fB\-\-debug\fR]
[\fB\-\-help\fR]
.SH DESCRIPTION
.B wssshd
is a WebSocket SSH server daemon that provides secure tunneling capabilities for SSH and SCP connections. It accepts WebSocket connections from wsssh and wsscp clients, manages SSH tunnels, and provides a web-based management interface for client registration and tunnel monitoring.
.SH OPTIONS
.TP
.BR \-\-config " \fIFILE\fR"
Configuration file path (default: /etc/wssshd.conf)
.TP
.BR \-\-host " \fIHOST\fR"
Server bind address (default: 0.0.0.0)
.TP
.BR \-\-port " \fIPORT\fR"
Server port (default: 9898)
.TP
.BR \-\-ssl\-cert " \fIFILE\fR"
SSL certificate file path
.TP
.BR \-\-ssl\-key " \fIFILE\fR"
SSL private key file path
.TP
.B \-\-debug
Enable debug output for troubleshooting
.TP
.B \-\-help
Display help message and exit
.SH CONFIGURATION
The server can be configured through command line options or configuration files. The configuration file supports the following sections and options:
.TP
.B [server]
- \fBhost\fR: Server bind address
- \fBport\fR: Server port
- \fBssl_cert\fR: SSL certificate file
- \fBssl_key\fR: SSL private key file
- \fBdebug\fR: Enable debug mode
.TP
.B [database]
- \fBpath\fR: SQLite database file path
.TP
.B [web]
- \fBusername\fR: Web interface username
- \fBpassword\fR: Web interface password (hashed)
- \fBsecret_key\fR: Flask secret key for sessions
.SH EXAMPLES
.TP
Start server with default configuration:
.B wssshd
.TP
Start server with custom configuration:
.B wssshd --config /etc/wssshd/custom.conf
.TP
Start server with debug output:
.B wssshd --debug --port 8080
.TP
Start server with SSL:
.B wssshd --ssl-cert /etc/ssl/certs/wssshd.crt --ssl-key /etc/ssl/private/wssshd.key
.SH WEB INTERFACE
The server provides a web-based management interface accessible at https://server:port/ (when SSL is enabled) or http://server:port/ (without SSL). The web interface allows:
- Client registration and management
- Tunnel monitoring and control
- System status and logs
- Configuration management
.SH SECURITY
The server supports SSL/TLS encryption for all communications. For production deployments:
- Use properly signed SSL certificates
- Configure strong passwords for the web interface
- Use firewall rules to restrict access to the server port
- Regularly update the server and dependencies
.SH SIGNALS
.TP
.B SIGTERM, SIGINT
Graceful shutdown of the server
.TP
.B SIGHUP
Reload configuration (if supported)
.SH FILES
.TP
.I /etc/wssshd.conf
Main configuration file
.TP
.I /var/lib/wssshd/wssshd.db
SQLite database for client and tunnel data
.TP
.I /var/log/wssshd/
Log directory
.TP
.I /etc/init.d/wssshd
Init script for service management
.SH EXIT STATUS
.B wssshd
returns 0 on successful operation, non-zero on errors.
.SH SEE ALSO
.BR wsssh (1),
.BR wssshc (1),
.BR wsscp (1),
.BR ssh (1)
.SH AUTHOR
Written by Stefy Lanza <stefy@nexlab.net>
.SH COPYRIGHT
Copyright \(co 2024 Stefy Lanza and SexHack.me. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.SH BUGS
Report bugs to: https://github.com/stefy/wsssh/issues
\ No newline at end of file
Format: 1.0
Source: wsssh-tools
Binary: wsssh-tools wsssh-tools-dbgsym
Architecture: amd64 source
Version: 1.3.4-1
Checksums-Md5:
38c067ea3480c3fbeff48053919c3bfd 693 wsssh-tools_1.3.4-1.dsc
4b57871694a0f69f8fcf776851bf0abc 5160 wsssh-tools-dbgsym_1.3.4-1_amd64.deb
3c3fc6dbb344b8190de93efa16073439 33760 wsssh-tools_1.3.4-1_amd64.deb
Checksums-Sha1:
ac9b818083520befe49f980a323709ede9d3b1d2 693 wsssh-tools_1.3.4-1.dsc
e15b2f6c2ffe692612c76516ac8dd243a8f8aa30 5160 wsssh-tools-dbgsym_1.3.4-1_amd64.deb
70205ef8cfa84d5ca331b538365176d7d1c5025f 33760 wsssh-tools_1.3.4-1_amd64.deb
Checksums-Sha256:
d858604594098204fea793f24a5e8de3752a14b524fb26ea503aeb8c6432f11d 693 wsssh-tools_1.3.4-1.dsc
9d670374777af4fd63a25a9618f84561e41af658b2d9c1034e85faebe7c66849 5160 wsssh-tools-dbgsym_1.3.4-1_amd64.deb
e801605f8a19d0a8a7f9434db41402e2877fa4ca6572d939bd59118094309779 33760 wsssh-tools_1.3.4-1_amd64.deb
Build-Origin: Devuan
Build-Architecture: amd64
Build-Date: Sat, 13 Sep 2025 20:34:38 +0200
Build-Tainted-By:
usr-local-has-configs
usr-local-has-libraries
usr-local-has-programs
Installed-Build-Depends:
autoconf (= 2.72-3.1),
automake (= 1:1.17-4),
autopoint (= 0.22.5-4),
autotools-dev (= 20220109.1),
base-files (= 13.6devuan1),
base-passwd (= 3.6.6),
bash (= 5.2.37-2+b5),
binutils (= 2.43.50.20250108-1),
binutils-common (= 2.43.50.20250108-1),
binutils-x86-64-linux-gnu (= 2.43.50.20250108-1),
bsdextrautils (= 2.40.2-14devuan1),
bsdutils (= 1:2.40.2-14devuan1),
build-essential (= 12.12),
bzip2 (= 1.0.8-6),
clang-13 (= 1:13.0.0-9+b2),
clang-16 (= 1:16.0.6-27),
clang-19 (= 1:19.1.7-3+b1),
coreutils (= 9.5-1+b1),
cpp (= 4:14.2.0-1),
cpp-10 (= 10.5.0-4),
cpp-11 (= 11.5.0-2),
cpp-13 (= 13.3.0-12),
cpp-13-x86-64-linux-gnu (= 13.3.0-12),
cpp-14 (= 14.2.0-12),
cpp-14-x86-64-linux-gnu (= 14.2.0-12),
cpp-x86-64-linux-gnu (= 4:14.2.0-1),
dash (= 0.5.12-11),
debconf (= 1.5.89),
debhelper (= 13.26),
debianutils (= 5.21),
dh-autoreconf (= 20),
dh-strip-nondeterminism (= 1.14.2-1),
diffutils (= 1:3.10-2),
dpkg (= 1.22.13),
dpkg-dev (= 1.22.13),
dwz (= 0.15-1+b1),
file (= 1:5.45-3+b1),
findutils (= 4.10.0-3),
g++ (= 4:14.2.0-1),
g++-14 (= 14.2.0-12),
g++-14-x86-64-linux-gnu (= 14.2.0-12),
g++-x86-64-linux-gnu (= 4:14.2.0-1),
gawk (= 1:5.2.1-2+b1),
gcc (= 4:14.2.0-1),
gcc-10 (= 10.5.0-4),
gcc-10-base (= 10.5.0-4),
gcc-11 (= 11.5.0-2),
gcc-11-base (= 11.5.0-2),
gcc-13 (= 13.3.0-12),
gcc-13-base (= 13.3.0-12),
gcc-13-x86-64-linux-gnu (= 13.3.0-12),
gcc-14 (= 14.2.0-12),
gcc-14-base (= 14.2.0-12),
gcc-14-x86-64-linux-gnu (= 14.2.0-12),
gcc-x86-64-linux-gnu (= 4:14.2.0-1),
gettext (= 0.22.5-4),
gettext-base (= 0.22.5-4),
grep (= 3.11-4),
groff-base (= 1.23.0-7),
gzip (= 1.12-1.2),
hostname (= 3.25),
init-system-helpers (= 1.68devuan1),
intltool-debian (= 0.35.0+20060710.6),
lib32gcc-s1 (= 14.2.0-12),
lib32stdc++6 (= 14.2.0-12),
libacl1 (= 2.3.2-2+b1),
libarchive-zip-perl (= 1.68-1),
libasan6 (= 11.5.0-2),
libasan8 (= 14.2.0-12),
libatomic1 (= 14.2.0-12),
libattr1 (= 1:2.5.2-2),
libaudit-common (= 1:4.0.2-2),
libaudit1 (= 1:4.0.2-2),
libbinutils (= 2.43.50.20250108-1),
libblkid1 (= 2.40.2-14devuan1),
libbsd0 (= 0.12.2-2),
libbz2-1.0 (= 1.0.8-6),
libc-bin (= 2.40-5),
libc-dev-bin (= 2.40-5),
libc6 (= 2.40-5),
libc6-dev (= 2.40-5),
libc6-i386 (= 2.40-5),
libcap-ng0 (= 0.8.5-4),
libcap2 (= 1:2.66-5+b1),
libcc1-0 (= 14.2.0-12),
libclang-common-13-dev (= 1:13.0.0-9+b2),
libclang-common-16-dev (= 1:16.0.6-27),
libclang-common-19-dev (= 1:19.1.7-3+b1),
libclang-cpp13 (= 1:13.0.0-9+b2),
libclang-cpp16t64 (= 1:16.0.6-27),
libclang-cpp19 (= 1:19.1.7-3+b1),
libclang1-13 (= 1:13.0.0-9+b2),
libclang1-16t64 (= 1:16.0.6-27),
libclang1-19 (= 1:19.1.7-3+b1),
libcrypt-dev (= 1:4.4.36-5),
libcrypt1 (= 1:4.4.36-5),
libctf-nobfd0 (= 2.43.50.20250108-1),
libctf0 (= 2.43.50.20250108-1),
libdb5.3t64 (= 5.3.28+dfsg2-9),
libdebconfclient0 (= 0.277),
libdebhelper-perl (= 13.26),
libdpkg-perl (= 1.22.13),
libedit2 (= 3.1-20240808-1),
libelf1t64 (= 0.192-4),
libelogind-compat (= 255.17-2),
libelogind0 (= 255.17-2),
libeudev1 (= 3.2.14-2),
libffi8 (= 3.4.6-1),
libfile-stripnondeterminism-perl (= 1.14.2-1),
libgc1 (= 1:8.2.8-1),
libgcc-10-dev (= 10.5.0-4),
libgcc-11-dev (= 11.5.0-2),
libgcc-13-dev (= 13.3.0-12),
libgcc-14-dev (= 14.2.0-12),
libgcc-s1 (= 14.2.0-12),
libgdbm-compat4t64 (= 1.24-2),
libgdbm6t64 (= 1.24-2),
libgmp10 (= 2:6.3.0+dfsg-3),
libgomp1 (= 14.2.0-12),
libgprofng0 (= 2.43.50.20250108-1),
libhwasan0 (= 14.2.0-12),
libicu72 (= 72.1-6),
libisl23 (= 0.27-1),
libitm1 (= 14.2.0-12),
libjansson4 (= 2.14-2+b3),
libllvm13 (= 1:13.0.0-9+b2),
libllvm16t64 (= 1:16.0.6-27),
libllvm19 (= 1:19.1.7-3+b1),
liblsan0 (= 14.2.0-12),
liblzma5 (= 5.6.3-1+b1),
libmagic-mgc (= 1:5.45-3+b1),
libmagic1t64 (= 1:5.45-3+b1),
libmd0 (= 1.1.0-2+b1),
libmount1 (= 2.40.2-14devuan1),
libmpc3 (= 1.3.1-1+b3),
libmpfr6 (= 4.2.1-1+b2),
libobjc-11-dev (= 11.5.0-2),
libobjc-13-dev (= 13.3.0-12),
libobjc-14-dev (= 14.2.0-12),
libobjc4 (= 14.2.0-12),
libpam-modules (= 1.5.3-7+b1),
libpam-modules-bin (= 1.5.3-7+b1),
libpam-runtime (= 1.5.3-7),
libpam0g (= 1.5.3-7+b1),
libpcre2-8-0 (= 10.44-5),
libperl5.40 (= 5.40.1-5),
libpipeline1 (= 1.5.8-1),
libpkgconf3 (= 1.8.1-4),
libquadmath0 (= 14.2.0-12),
libreadline8t64 (= 8.2-6),
libseccomp2 (= 2.5.5-2),
libselinux1 (= 3.7-3+b1),
libsframe1 (= 2.43.50.20250108-1),
libsigsegv2 (= 2.14-1+b2),
libsmartcols1 (= 2.40.2-14devuan1),
libssl-dev (= 3.4.0-2),
libssl3t64 (= 3.4.0-2),
libstdc++-11-dev (= 11.5.0-2),
libstdc++-13-dev (= 13.3.0-12),
libstdc++-14-dev (= 14.2.0-12),
libstdc++6 (= 14.2.0-12),
libtinfo6 (= 6.5-2+b1),
libtool (= 2.5.4-2),
libtsan0 (= 11.5.0-2),
libtsan2 (= 14.2.0-12),
libubsan1 (= 14.2.0-12),
libuchardet0 (= 0.0.8-1+b2),
libunistring5 (= 1.3-1),
libuuid1 (= 2.40.2-14devuan1),
libxml2 (= 2.12.7+dfsg+really2.9.14-0.2+b1),
libz3-4 (= 4.13.3-1),
libzstd1 (= 1.5.6+dfsg-2),
linux-libc-dev (= 6.12.15-1),
llvm-16-linker-tools (= 1:16.0.6-27),
llvm-19-linker-tools (= 1:19.1.7-3+b1),
m4 (= 1.4.19-5),
make (= 4.4.1-1),
man-db (= 2.13.0-1),
mawk (= 1.3.4.20240905-1),
ncurses-base (= 6.5-2),
ncurses-bin (= 6.5-2+b1),
openssl-provider-legacy (= 3.4.0-2),
patch (= 2.7.6-7),
perl (= 5.40.1-5),
perl-base (= 5.40.1-5),
perl-modules-5.40 (= 5.40.1-5),
pkg-config (= 1.8.1-4),
pkgconf (= 1.8.1-4),
pkgconf-bin (= 1.8.1-4),
po-debconf (= 1.0.21+nmu1),
readline-common (= 8.2-6),
rpcsvc-proto (= 1.4.3-1),
sed (= 4.9-2),
sensible-utils (= 0.0.24),
sysvinit-utils (= 3.13-1devuan1),
tar (= 1.35+dfsg-3.1),
util-linux (= 2.40.2-14devuan1),
xz-utils (= 5.6.3-1+b1),
zlib1g (= 1:1.3.dfsg+really1.3.1-1+b1)
Environment:
DEB_BUILD_OPTIONS="parallel=8"
LANG="en_ZA.UTF-8"
SOURCE_DATE_EPOCH="1757773800"
......@@ -118,14 +118,17 @@ async def connect_to_server(server_ip, port, client_id, password, interval, shut
print(f"Connection failed: {e}, retrying in {interval} seconds")
await asyncio.sleep(interval)
def main():
def load_config_file(config_path):
"""Load configuration from a specific file path"""
if not os.path.exists(config_path):
return {}
config = configparser.ConfigParser()
config_path = os.path.expanduser('~/.config/wsssh/wssshc.conf')
defaults = {'interval': 30, 'port': 9898}
if os.path.exists(config_path):
try:
config.read(config_path)
if 'wssshc' in config:
section = config['wssshc']
defaults = {}
for key in ['password', 'id']:
if key in section:
defaults[key] = section[key]
......@@ -135,9 +138,37 @@ def main():
defaults['server_ip'] = section['domain']
if 'port' in section:
defaults['port'] = int(section['port'])
if 'interval' in section:
defaults['interval'] = int(section['interval'])
return defaults
except Exception as e:
if debug: print(f"[DEBUG] Error reading config file {config_path}: {e}")
return {}
def main():
# Configuration hierarchy:
# 1. System config (/etc/wssshc.conf)
# 2. User config (~/.config/wsssh/wssshc.conf)
# 3. Command line arguments (highest priority)
# Load system config first (lowest priority)
system_config = '/etc/wssshc.conf'
defaults = load_config_file(system_config)
# Load user config (medium priority, overrides system)
user_config = os.path.expanduser('~/.config/wsssh/wssshc.conf')
user_defaults = load_config_file(user_config)
defaults.update(user_defaults)
# Set default values if not set by config files
defaults.setdefault('interval', 30)
defaults.setdefault('port', 9898)
# Parse command line arguments (highest priority)
parser = argparse.ArgumentParser(description='WebSocket SSH Client (wssshc)')
parser.set_defaults(**defaults)
parser.add_argument('--config', help='Configuration file path (overrides default hierarchy)')
parser.add_argument('--server-ip', help='Server IP address')
parser.add_argument('--port', type=int, help='Server port')
parser.add_argument('--id', help='Client ID')
......@@ -145,6 +176,19 @@ def main():
parser.add_argument('--interval', type=int, help='Reconnect interval in seconds (default: 30)')
parser.add_argument('--debug', action='store_true', help='Enable debug output')
# Parse just the config argument first to check for custom config file
temp_parser = argparse.ArgumentParser(add_help=False)
temp_parser.add_argument('--config')
temp_args, remaining = temp_parser.parse_known_args()
# If --config is specified, load that file instead of the hierarchy
if temp_args.config:
custom_defaults = load_config_file(temp_args.config)
defaults.update(custom_defaults)
parser.set_defaults(**defaults)
args = parser.parse_args()
args = parser.parse_args()
# Check required arguments
......
......@@ -10,10 +10,12 @@ wsssh-tools (1.3.4-1) unstable; urgency=medium
-- Stefy Lanza <stefy@nexlab.net> Fri, 13 Sep 2025 16:30:00 +0200
wsssh-tools (1.3.2-1) unstable; urgency=medium
wsssh-tools (1.4.0-1) unstable; urgency=medium
* Version 1.3.2: Added configuration file support to wssshd
* Added system-wide config file /etc/wssshd.conf for wssshd daemon
* Version 1.4.0: Added wsssh-server Debian package for wssshd daemon
* Added comprehensive wssshd man page and documentation
* Enhanced build system with --server-only option support
* Improved package separation between server and client components
* Default host, port, password, domain, web-port, web-host, web-https settings
* Command line arguments take precedence over config file values
* Improved server deployment and configuration management
......
.TH WSSCP 1 "September 2025" "wsssh-tools 1.3.2" "WebSocket SSH Tools"
.TH WSSCP 1 "September 2025" "wsssh-tools 1.4.0" "WebSocket SSH Tools"
.SH NAME
wsscp \- WebSocket SCP wrapper for secure file transfer
.SH SYNOPSIS
......
.TH WSSH 1 "September 2025" "wsssh-tools 1.3.2" "WebSocket SSH Tools"
.TH WSSH 1 "September 2025" "wsssh-tools 1.4.0" "WebSocket SSH Tools"
.SH NAME
wsssh \- WebSocket SSH wrapper for secure tunneling
.SH SYNOPSIS
......
.TH WSSHc 1 "September 2025" "wsssh-tools 1.3.2" "WebSocket SSH Tools"
.TH WSSHc 1 "September 2025" "wsssh-tools 1.4.0" "WebSocket SSH Tools"
.SH NAME
wssshc \- WebSocket SSH Client for registration
.SH SYNOPSIS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment