Commit Graph
99 Commits
Author SHA1 Message Date
Sergey Krashevich 5b481a27c6 fix(network): enable autoResize in network settings 2024-06-16 21:57:48 +03:00
Sergey Krashevich d8aed552bc fix(network): ensure consistent node positions by storing and reusing seed 2024-06-16 15:22:33 +03:00
Sergey Krashevich cb44d5431a feat(network): preserve pan and scale on data reload 2024-06-16 15:01:40 +03:00
Sergey Krashevich a69eb8a66e style(network): add flex-grow to network div and move script tag 2024-06-16 14:54:02 +03:00
Sergey Krashevich 1b411b1fed refactor(streams): optimize label generation with strings.Builder
feat(network): add periodic data fetching and network update
2024-06-16 10:19:17 +03:00
Sergey Krashevich 5d57959608 fix(streams): handle missing codec_name in appendDOT function 2024-06-16 08:59:06 +03:00
Sergey Krashevich 72d7e8aaaa refactor(app): remove syscall import and improve error messages 2024-06-08 15:05:26 +03:00
Sergey Krashevich b389d0eb9c fix(app): handle daemon process correctly on Unix systems 2024-06-06 18:54:40 +03:00
Sergey Krashevich df1d44d24e chore(deps): update Go version to 1.22 across project files 2024-05-30 17:12:56 +03:00
Sergey Krashevich 79245eeff4 fix(ci): skip GitHub Container Registry login on pull requests 2024-05-30 11:48:15 +03:00
Sergey Krashevich aa86c1ec25 ci(workflow): add GitHub Container Registry login and update image paths 2024-05-30 11:28:06 +03:00
Sergey Krashevich cc74504ed8 feat(shell): add Windows support for TTY detection 2024-05-28 10:19:51 +03:00
Sergey KrashevichandGitHub 791239be12 Merge branch 'master' into feat-log-terminal-check 2024-05-28 09:15:01 +03:00
Sergey Krashevich a79061c7c2 feat(logging): add interactive shell detection for console output 2024-05-28 09:10:51 +03:00
Sergey Krashevich 3952f0ba0f add git to build stage 2024-05-18 13:47:02 +03:00
Sergey Krashevich 0cb013a7fd Refactor probe link placement in UI
Moved the 'probe' link from the global templates array to individual
stream status columns for improved clarity and accessibility. This
change enhances the interface by contextualizing the 'probe' option,
making it directly accessible alongside each stream's online status and
info link, thereby streamlining the user experience and emphasizing the
function's importance on a per-stream basis. This adjustment follows
usability feedback indicating that users prefer immediate access to
stream diagnostics.
2024-05-15 12:41:30 +03:00
Sergey Krashevich dd7ea2657a feat(app): enhance CLI with shorthand flags and dynamic versioning
- Added shorthand flag support for `config`, `daemon`, and `version`
- Implemented dynamic version string generation using build info
- Updated flag usage output to include shorthand options and help command
2024-05-12 22:10:58 +03:00
Sergey Krashevich eaba451a47 refactor(app): streamline version info retrieval and formatting 2024-05-12 06:46:45 +03:00
Sergey Krashevich b7c11db604 feat(version): enhance version command output with VCS revision and timestamp 2024-05-12 06:36:25 +03:00
Sergey Krashevich 1b1bdb37db feat(branding): prepend 'go2rtc -' to page titles in add, editor, and log pages 2024-05-09 12:06:46 +03:00
Sergey Krashevich ab453d275e feat(editor): upgrade Ace editor to version 1.33.1 2024-05-09 11:30:26 +03:00
Sergey Krashevich e71ed5e7eb feat(icons): add favicon and apple-touch-icon links across all pages
Added favicon, apple-touch-icon, and related meta tags to all HTML pages to ensure consistent branding and improve user experience on various platforms.
2024-05-09 06:30:14 +03:00
Sergey Krashevich 122a550599 feat(icons): add website icons and update GH Pages workflow to include icon changes 2024-05-09 06:25:33 +03:00
Sergey Krashevich f3f08afac8 ci(build.yml): enable latest tag and onlatest for hardware suffix
This commit updates the GitHub Actions workflow to ensure that images built with a hardware suffix are tagged as 'latest'. Additionally, it modifies the README.md to enhance the documentation around the Docker container deployment, including basic and GPU-accelerated deployment instructions.
2024-05-09 06:07:50 +03:00
Sergey Krashevich f158ffb33e Merge remote-tracking branch 'upstream/master' into refactr-syscall-more-generic 2024-05-07 14:45:48 +03:00
Sergey Krashevich 5d9c254282 feat(build): add multi-platform build script for go2rtc 2024-05-04 05:56:34 +03:00
Sergey Krashevich abe617a346 refactor(ffmpeg): generalize device and hardware support for multiple OS
- Rename `device_freebsd.go` to `device_bsd.go` and `hardware_freebsd.go` to `hardware_bsd.go` to reflect broader BSD support (FreeBSD, NetBSD, OpenBSD, Dragonfly).
- Update build tags in `device_bsd.go` and `hardware_bsd.go` to include FreeBSD, NetBSD, OpenBSD, and Dragonfly.
- Rename `device_linux.go` to `device_unix.go` and `hardware_linux.go` to `hardware_unix.go` to generalize Unix support excluding Darwin-based systems and BSDs.
- Add specific build tags to `device_darwin.go`, `device_unix.go`, `hardware_darwin.go`, and `hardware_unix.go` to correctly target their respective operating systems.
- Ensure Windows-specific files (`device_windows.go` and `hardware_windows.go`) are correctly tagged for building on Windows.
2024-05-01 09:04:19 +03:00
Sergey Krashevich e080eac204 refactor(mdns): consolidate platform-specific syscall files
- Rename `syscall_linux.go` to `syscall.go` with build constraints for non-BSD and non-Windows platforms.
- Merge `syscall_darwin.go` into `syscall_bsd.go` and adjust build constraints for BSD platforms (Darwin, FreeBSD, OpenBSD).
- Remove redundant `syscall_freebsd.go`.
- Add build constraints to `syscall_windows.go` for Windows platform.
2024-04-30 01:55:51 +03:00
Sergey Krashevich 5f2d523242 feat(logging): enhance log visualization with level-specific colors
- Add CSS classes for log levels (info, debug, error, trace, warn) in main.js to color-code log messages based on their severity.
- Modify log.html to include the log level as a class in each log entry's table row for applying the corresponding color styles.
2024-04-29 15:03:22 +03:00
Sergey Krashevich 8516f825e1 feat(web-ui): add confirmation dialog before deleting streams 2024-04-26 16:05:56 +03:00
Sergey Krashevich bcfc64bef1 chore(gitignore): ignore .DS_Store files 2024-04-26 12:08:48 +03:00
Sergey KrashevichandGitHub 1d59c02745 Merge branch 'AlexxIT:master' into fix-new-stream-error 2024-04-23 03:25:12 +03:00
Sergey Krashevich a404c2c86c feat(editor): upgrade Ace editor version to 1.33.0 2024-04-20 21:55:37 +03:00
Sergey Krashevich 2ce8cec12f Merge remote-tracking branch 'upstream/master' into update-github-actions-vers 2024-04-20 13:56:30 +03:00
Sergey Krashevich 905ef9b1ba Merge remote-tracking branch 'upstream/master' into sec-fix-slowloris 2024-04-20 13:56:02 +03:00
Sergey Krashevich 7dc9eaa543 Merge remote-tracking branch 'upstream/master' into logs-reverse-order 2024-04-20 13:55:32 +03:00
Sergey Krashevich 215d55771c Merge remote-tracking branch 'upstream/master' into fix-webui-copy-function 2024-04-20 13:55:18 +03:00
Sergey Krashevich ac3d931576 Merge remote-tracking branch 'upstream/master' into simple-daemon-mode 2024-04-20 13:54:57 +03:00
Sergey Krashevich 484d401021 Merge remote-tracking branch 'upstream/master' into dark-mode 2024-04-20 13:14:48 +03:00
Sergey Krashevich 55d95691c8 Merge remote-tracking branch 'upstream/master' into fix-docker-hardware-optimize 2024-04-20 13:12:20 +03:00
Sergey Krashevich d28ae5caea docs(readme): update link for latest binary download method 2024-04-18 03:28:23 +03:00
Sergey Krashevich 5cf343cb69 feat(autoreload): change interval from 5 seconds to 1 second 2024-04-18 02:56:32 +03:00
Sergey Krashevich de7326375d feat(index.html): optimize stream list update and preserve checkbox states 2024-04-18 02:55:31 +03:00
Sergey Krashevich 936e84f6e0 feat(index.html): implement auto-reload functionality every 5 seconds 2024-04-18 02:52:54 +03:00
Sergey Krashevich e1ebed4859 fix(api): fix potential Slowloris Attack 2024-04-16 17:22:06 +03:00
Sergey Krashevich adf49b8475 feat(logging): more usable exec log 2024-04-14 21:56:07 +03:00
Sergey Krashevich ef38468fa7 feat(dark-mode): enhance form elements and hr visibility
This commit improves the visibility and aesthetics of form elements (input, select, textarea) and horizontal rules (hr) in dark mode by adjusting their styles. Specifically, it sets a darker background color, lighter text color, and modifies border colors to ensure these elements are both visually appealing and easily distinguishable against the dark background. Additionally, placeholder text color has been adjusted to maintain readability without being overly prominent.

The removal of a fixed width on the navigation bar (`nav`) style is aimed at enhancing responsiveness and flexibility in various screen sizes, promoting a better user experience across devices.

These changes contribute to a more cohesive and accessible dark mode theme, aligning with modern web design practices that prioritize user comfort and interface adaptability.
2024-04-09 10:00:41 +03:00
Sergey Krashevich ef54b04ffc feat(docker): optimize hardware.Dockerfile by cleaning up apt cache
This commit optimizes the Docker image size for the hardware setup by including commands to clean up the APT cache after package installation. This change reduces the overall image size by removing unnecessary files and directories that are not needed in the final image, leading to faster download and deployment times.
2024-04-09 09:35:53 +03:00
Sergey Krashevich 51e20497ac fix(styles): implement flex layout for body element 2024-04-09 09:32:59 +03:00
Sergey Krashevich 4ddadc08cb feat(editor-theme): dynamically set editor theme based on dark mode preference 2024-04-09 09:18:43 +03:00
Sergey Krashevich 20dd16badf feat(dark-mode): improve contrast and visited link styles 2024-03-23 07:03:53 +03:00
Sergey Krashevich 31398a7e6b feat(dark-mode): implement dark mode and centralize CSS
Implemented a dark mode feature for the website, including a toggle button in the navigation bar that allows users to switch between light and dark themes. To support this feature, centralized common CSS styles (such as body, table, and button stylings) into main.js to ensure consistent application across all HTML pages. This change improves user experience by providing a visually comfortable alternative for low-light environments and centralizes styling rules for easier maintenance.

- Added dark mode styles for body, table, buttons, and navigation elements in main.js.
- Introduced a toggle mechanism in the navigation bar to switch between light and dark modes.
- Utilized JavaScript to detect system theme preference (`prefers-color-scheme`) and persist user's theme choice using localStorage.
- Removed duplicate and scattered CSS rules from individual HTML files (add.html, index.html, links.html, log.html) and centralized them in main.js to reduce redundancy and facilitate easier updates in the future.

This update enhances accessibility and user preference compliance by allowing users to select their desired theme while simplifying CSS management across the website.
2024-03-22 18:15:52 +03:00
Sergey Krashevich de70b0a861 some fixes 2024-03-22 18:13:20 +03:00
Sergey Krashevich a50c99b8e5 feat(log): introduce toggle for reversing log order
Added a button to the log page allowing users to toggle the order in which logs are displayed (normal or reversed). This feature enhances user experience by providing flexibility in viewing logs. The implementation involves a boolean flag `reverseOrder` to track the current state of log order and dynamically updates the button text to reflect the current mode. Additionally, the log fetching function now conditionally reverses the log array based on this flag, ensuring that the display order matches the user's preference. This change could significantly improve usability for users needing to analyze recent events without scrolling through the entire log history.
2024-03-22 18:10:45 +03:00
Sergey Krashevich 9fc3d91a17 fix(streams): handle non-string elements in slice source for NewStream 2024-03-19 09:46:56 +03:00
Sergey Krashevich 9f7448d255 ci: upgrade GitHub Actions to newer versions
Updated various GitHub Actions used in the CI workflows (build.yml, gh-pages.yml, test.yml) to their latest major versions. This includes actions for checking out code, setting up Go, uploading artifacts, configuring Docker, and deploying to GitHub Pages. The update is part of routine maintenance to ensure compatibility with the latest features and improvements provided by these actions.
2024-02-24 13:14:51 +03:00
Sergey Krashevich 3afe8d7c1d fix(daemon-mode): handle '-daemon' argument correctly for background execution
This commit fixes the issue where the '-daemon' argument was not being properly handled when re-executing the program in daemon mode. The loop removes the '-daemon' flag from the arguments slice before the program is re-run in the background, ensuring that subsequent executions do not attempt to enter daemon mode again.

The change will prevent potential errors or unexpected behavior due to the presence of the '-daemon' argument in recursive calls, making the daemon mode feature more robust and reliable.
2024-02-24 13:04:18 +03:00
Sergey Krashevich 15c27e16cc feat(app): support daemon mode on non-Windows platforms
Added a new command-line flag `-daemon` to run the application in the background as a daemon. This option is only available for non-Windows operating systems due to platform-specific process handling. When enabled, the application restarts itself with the same arguments except for the `-daemon` flag, prints the PID of the background process, and then exits the current process.
2024-02-24 10:33:02 +03:00
c0455a20aa fix grammar
Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
2024-02-17 01:46:11 +03:00
Sergey Krashevich 6f9b8b732d Initial commit 2024-02-12 05:02:21 +00:00
Sergey Krashevich 48fabec431 fix(clipboard): fix copy to clipboard functionality
Added a `copyTextToClipboard` function to handle text copying across different browsers and fallback scenarios. This function utilizes the Clipboard API when available, providing an asynchronous method to copy text securely. For browsers where the Clipboard API is not available or the page is not served over a secure context, a fallback method using a temporary textarea element and `document.execCommand` is employed. Replaced direct use of `navigator.clipboard.writeText` with this function in the 'shareget' click event listener to enhance cross-browser support and error handling.
2024-01-13 18:07:07 +03:00
Sergey KrashevichandGitHub f8d9fccf74 fix(log-display): reverse log order to display newest first The
The applyLogStyling function in log.html has been updated to reverse the array of log lines. After parsing the JSON data, reversing the array ensures that the most recent logs appear at the top of the list. This change enhances the readability for users by displaying the logs in a descending chronological order.
2024-01-12 07:43:12 +03:00
Sergey Krashevich fc5b36acd3 actualise godoc comment for api.logHandler func 2023-12-05 17:54:53 +03:00
Sergey Krashevich 0a8ab9bbd1 Update app.go to remove the unused variable LogFilePath 2023-12-05 17:50:51 +03:00
Sergey Krashevich b60000ac34 Refactor log handling to use in-memory Logger 2023-12-05 17:44:32 +03:00
Sergey Krashevich 7ac5b4f114 Ensure exit code is within valid range
The exitHandler function now properly validates the exit code provided
in the query string. It checks for conversion errors and ensures the
code is within the valid range of 0 to 125. If the validation fails,
it responds with an HTTP 400 Bad Request error. This prevents potential
misuse of the exit endpoint by restricting the exit codes to expected
values.
2023-11-29 10:03:39 +03:00
Sergey Krashevich ab47d5718f Refactor log handling and add UI auto-update toggle
This commit refactors the log handling in the API to use a switch statement for improved readability and maintainability. It also introduces error messages with more context when reading or truncating the log file fails.

On the frontend, a new auto-update toggle button has been added to the log viewer, allowing users to enable or disable automatic log updates. The button's appearance changes based on its state, providing a clear visual indication of whether auto-update is active. Additionally, the button styling has been updated to ensure consistency across the interface.
2023-11-28 22:55:50 +03:00
Sergey Krashevich 8d382afa0f Add log file handling and viewing capabilities
This commit introduces the ability to handle log files through the API and
provides a new log viewing page. The API now supports GET and DELETE methods
for log file operations, allowing retrieval and deletion of log contents.
A new log.html page has been added for viewing logs in the browser, with
automatic refresh every 5 seconds and styling based on log levels.

The app.go file has been updated to include a GetLogFilepath function that
retrieves or generates the log file path. The NewLogger function now accepts
a file parameter to enable file logging. The main.js file has been updated
to include a link to the new log.html page.

This enhancement improves the observability and management of the application
by providing real-time access to logs and the ability to clear them directly
from the web interface.
2023-11-26 23:21:57 +03:00
Sergey Krashevich 95de3a1f3e Update openapi.yaml 2023-10-19 16:40:14 +03:00
Sergey KrashevichandGitHub f27f7d28bb Update editor.html 2023-09-30 12:38:31 +03:00
Sergey KrashevichandGitHub 81fb8fc238 Update README.md 2023-09-27 14:11:03 +03:00
Sergey Krashevich aa5b23fa80 fix openapi specs 2023-09-25 07:41:55 +03:00
Sergey Krashevich 9368a6b85e Add conditional check before adding a new pair in the server's AddPair function 2023-09-11 10:34:31 +03:00
Sergey Krashevich 541a7b28a7 Refactor LocalIP method to correctly handle non-TCP connections 2023-09-05 10:27:12 +03:00
Sergey Krashevich 9f14b30aae Refactor CSS in editor.html for better readability and remove duplicate body rule 2023-08-23 17:24:17 +03:00
Sergey Krashevich 065a6f4f46 Update Debian and Go versions to bookworm-slim and 1.21-bookworm respectively in hardware.Dockerfile 2023-08-23 17:06:21 +03:00
Sergey Krashevich 6f5ba2ade6 Update ace library version to 1.24.1 and fix code syntax in editor.html 2023-08-23 12:59:05 +03:00
Sergey Krashevich 0822326900 Update Go version to 1.21 in build and test workflows and Dockerfiles 2023-08-23 10:09:53 +03:00
Sergey Krashevich 490a48cd50 Refactored code to resize JPEG snapshot if "h" parameter exists in the URL query 2023-07-11 10:35:53 +03:00
Sergey Krashevich c94d1e237d Merge remote-tracking branch 'remotes/upstream/master' into patch-listen-tls 2023-05-21 23:29:08 +03:00
Sergey KrashevichandGitHub 981974eac9 Update hardware.Dockerfile 2023-05-04 22:45:39 +03:00
Sergey Krashevich 5b29306d4f Refactor video toolbox probe commands to use SVGA resolution in hardware_darwin.go 2023-05-04 22:22:00 +03:00
Sergey Krashevich af717b2172 add tls support 2023-04-14 18:28:03 +03:00
Sergey Krashevich 722b2827a1 Update Go version to 1.20 in test.yml and Dockerfiles 2023-04-03 20:30:25 +03:00
Sergey Krashevich 59347a409e Add cache for faster Docker builds from the GitHub Actions environment in ".github/workflows/docker.yml". 2023-04-02 07:05:09 +03:00
Sergey Krashevich 49e861d1b0 Update Docker build-push-action to version 4 in workflows/docker.yml and workflows/test.yml and deploy-pages to version 2 in workflows/gh-pages.yml 2023-04-02 04:02:28 +03:00
Sergey Krashevich b1701e856a Update hardware.Dockerfile 2023-04-02 02:28:44 +03:00
Sergey Krashevich a6260d0f56 Refactor Receiver and Sender methods to use RLock instead of Lock 2023-03-28 16:44:52 +03:00
Sergey Krashevich 693d41be87 Add buffer size of 8M to RTSP output in ffmpeg and handle EOF error when accepting RTSP connection in rtsp.go 2023-03-28 15:47:25 +03:00
Sergey Krashevich 222dc6a5c2 Refactor code to include buffer channels to prevent blocking in handler functions and add RWMutex to Receiver and Sender structs for concurrency-safe data access 2023-03-28 05:56:35 +03:00
Sergey Krashevich 91a7b5be27 Update editor.html 2023-02-27 05:37:17 +03:00
Sergey Krashevich eca311717a Update index.html 2023-02-27 02:02:32 +03:00
Sergey Krashevich d3b2b8fdae add docker testing 2023-02-21 18:24:41 +03:00
Sergey Krashevich 3b9a0059df Create test.yml 2023-02-21 17:54:55 +03:00
Sergey Krashevich a388002b12 Merge branch 'master' into macos-lipo 2023-02-04 20:40:46 +03:00
Sergey Krashevich b7391f58a5 Update release.yml 2023-01-28 03:21:03 +03:00
Sergey KrashevichandGitHub a36359f3dd Update api.go 2023-01-20 18:38:46 +03:00
Sergey Krashevich b7016e798f Update config.go 2023-01-14 21:27:23 +03:00
Sergey Krashevich b51aabd3d9 Update Dockerfile 2023-01-06 11:52:09 +03:00