Files
flutter_opencode_client/lib/data
GT610 183cdf98eb feat(port_forward): Supports local, remote, and dynamic port forwarding types (#1096)
* feat(port_forward): Supports local, remote, and dynamic port forwarding types

Added the PortForwardType enumeration to extend port forwarding functionality, supporting three modes:
1. Local forwarding (Local)
2. Remote forwarding (Remote)
3. Dynamic forwarding (SOCKS5)

Refactored the PortForwardConfig model and related adapters, and updated the UI configuration interface to support type selection

* fix(port_forward): Fixed display and validation issues with port forwarding configurations

Fixed the display logic for the local host; when the type is set to “Dynamic Forwarding,” 127.0.0.1 is used by default
Added validation for required fields in remote forwarding configurations to ensure that the remote host and port are not empty
Optimized remote forwarding log messages by removing redundant local address displays

* fix(port_forward): Fixed issues with remote port forwarding configuration and connections

- Fixed the handling of default values when the remote port forwarding type field is empty
- Corrected the labels for local/remote host and port displayed on the remote port forwarding interface
- Fixed the local port validation logic to disallow 0 or negative numbers
- Implemented connection management and error handling for remote port forwarding

* feat (Port Forwarding): Add localization labels for types and optimize code

Add localization labels for local and remote types in the port forwarding feature

Simplify the logic for retrieving prompt text on the port forwarding page
Change the default binding host from ‘0.0.0.0’ to 'localhost'

* fix(port_forward): Fixed an issue with the display format of remote port forwarding addresses

Added special handling for remote port forwarding types in the `displayAddr` method of `PortForwardConfig` to correctly display the remote bound address and port. Also optimized the code formatting to improve readability.

* refactor(port_forward): Remove automatically generated JSON serialization code and implement it manually

Modify the JSON parsing logic in PortForwardConfig and remove the automatically generated .g.dart files
Simplify the handling of localhost addresses in displayAddr
2026-04-01 17:30:55 +08:00
..