Skip to content

Commit 8bc2093

Browse files
authored
Revert "Dev"
1 parent 0ddb410 commit 8bc2093

175 files changed

Lines changed: 8604 additions & 6168 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.clang-tidy‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎CMakeLists.txt‎

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ add_library(vtcore
419419
src/core/error_handler.cc src/core/error_handler.hh
420420
src/core/crash_report.cc src/core/crash_report.hh
421421
src/network/remote_link.cc src/network/remote_link.hh
422+
src/network/reverse_ssh_service.cc src/network/reverse_ssh_service.hh
422423
src/core/debug.cc src/core/debug.hh
423424
src/core/generic_char.cc src/core/generic_char.hh
424425
src/core/logger.cc src/core/logger.hh
@@ -551,7 +552,9 @@ target_link_libraries(vt_print vtcore)
551552
add_executable(vt_cdu cdu/cdu_main.cc main/hardware/cdu_att.cc)
552553
target_link_libraries(vt_cdu vtcore)
553554

554-
555+
# Reverse SSH daemon
556+
add_executable(reverse_ssh_daemon src/network/reverse_ssh_daemon.cc)
557+
target_link_libraries(reverse_ssh_daemon vtcore)
555558

556559
# Test executable to verify Catch2 integration
557560
if(BUILD_TESTING)
@@ -585,7 +588,7 @@ install(CODE "file(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/viewtouch/dat/crashre
585588
install(CODE "file(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/viewtouch/bin/vtcommands)")
586589
install(CODE "file(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/share/viewtouch/fonts)")
587590

588-
install(TARGETS vtpos vt_cdu vt_print vt_term vt_main
591+
install(TARGETS vtpos vt_cdu vt_print vt_term vt_main reverse_ssh_daemon
589592
RUNTIME DESTINATION viewtouch/bin
590593
LIBRARY DESTINATION viewtouch/lib
591594
ARCHIVE DESTINATION viewtouch/lib/static)
@@ -623,7 +626,30 @@ else()
623626
endif()
624627
install(PROGRAMS scripts/tools/vtcommands.pl DESTINATION viewtouch/bin/vtcommands)
625628

626-
629+
# Install reverse SSH daemon service, configuration, and management scripts
630+
# Skip systemd service installation in CI environments (requires root permissions)
631+
if(NOT DEFINED ENV{CI})
632+
install(PROGRAMS scripts/system/reverse-ssh-daemon.service DESTINATION /etc/systemd/system/)
633+
message(STATUS "Installing reverse SSH daemon systemd service to /etc/systemd/system/")
634+
else()
635+
message(STATUS "Skipping systemd service installation (CI environment detected)")
636+
endif()
637+
install(PROGRAMS scripts/tools/vt_reverse_ssh DESTINATION viewtouch/bin/)
638+
install(PROGRAMS scripts/tools/vt_ssh_security DESTINATION viewtouch/bin/)
639+
install(PROGRAMS scripts/tools/vt_reverse_ssh_setup DESTINATION viewtouch/bin/)
640+
641+
# Install reverse SSH configuration file
642+
# Skip /etc/viewtouch/ installation in CI environments (requires root permissions)
643+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/config/reverse_ssh_daemon.conf")
644+
if(NOT DEFINED ENV{CI})
645+
install(FILES config/reverse_ssh_daemon.conf DESTINATION /etc/viewtouch/ RENAME reverse_ssh.conf)
646+
message(STATUS "Installing reverse SSH configuration file to /etc/viewtouch/reverse_ssh.conf")
647+
else()
648+
message(STATUS "Skipping /etc/viewtouch/ configuration file installation (CI environment detected)")
649+
endif()
650+
else()
651+
message(WARNING "Reverse SSH configuration file not found: config/reverse_ssh_daemon.conf")
652+
endif()
627653

628654
#install(CODE "MESSAGE(\"Sample install message.\")")
629655

‎Testing/Temporary/CTestCostData.txt‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎config/reverse_ssh_daemon.conf‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# ViewTouch Reverse SSH Daemon Configuration
2+
# Copy this file to /etc/viewtouch/reverse_ssh.conf and customize the settings
3+
4+
# Management server details
5+
management_server=management.viewtouch.com
6+
management_port=22
7+
remote_user=viewtouch
8+
9+
# Tunnel configuration
10+
# Local port to expose (typically SSH port 22)
11+
local_port=22
12+
# Remote port on management server (0 = auto-assign)
13+
remote_port=0
14+
15+
# SSH authentication
16+
ssh_key_path=/usr/viewtouch/ssh/reverse_ssh_key
17+
18+
# Connection settings
19+
reconnect_interval=30
20+
health_check_interval=60
21+
max_retries=10
22+
23+
# Daemon settings
24+
log_file=/var/log/viewtouch/reverse_ssh_daemon.log
25+
pid_file=/var/run/viewtouch/reverse_ssh_daemon.pid
26+
daemonize=true

0 commit comments

Comments
 (0)