-
Notifications
You must be signed in to change notification settings - Fork 25
feat: adding telnet streamer support #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vadvolo
wants to merge
3
commits into
annetutil:main
Choose a base branch
from
vadvolo:telnet-streamer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Streamer Types | ||
|
|
||
| `gnetcli` supports different connection types (streamers) for connecting to network equipment: SSH, Telnet. | ||
|
|
||
| ## Supported Types | ||
|
|
||
| ### SSH (StreamerType_ssh) | ||
| - **Value**: `0` | ||
| - **Description**: Connection via SSH protocol (default) | ||
| - **Default port**: 22 | ||
| - **Features**: | ||
| - SSH tunnel support (ProxyJump) | ||
| - SSH Control Files support | ||
| - SSH Agent support | ||
| - Private key authentication | ||
| - SFTP for file transfers | ||
|
|
||
| ### Telnet (StreamerType_telnet) | ||
| - **Value**: `1` | ||
| - **Description**: Connection via Telnet protocol | ||
| - **Default port**: 23 | ||
| - **Features**: | ||
| - Plain text connection | ||
| - Username/password authentication | ||
| - Custom port support | ||
|
|
||
| ## API Usage | ||
|
|
||
| ### Via gRPC | ||
| The streamer type is specified in host parameters: | ||
|
|
||
| ```protobuf | ||
| message HostParams { | ||
| string host = 1; | ||
| Credentials credentials = 2; | ||
| int32 port = 3; | ||
| string device = 4; | ||
| string ip = 5; | ||
| StreamerType streamer_type = 6; // SSH or Telnet | ||
| } | ||
| ``` | ||
|
|
||
| ### Example Request | ||
| ```json | ||
| { | ||
| "host": "192.168.1.1", | ||
| "cmd": "show version", | ||
| "host_params": { | ||
| "streamer_type": 1, // Use Telnet | ||
| "port": 23, | ||
| "credentials": { | ||
| "login": "admin", | ||
| "password": "password" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Choosing Streamer Type | ||
|
|
||
| ### SSH is recommended for: | ||
| - Modern network equipment | ||
| - Production environments where security is important | ||
| - Devices supporting cryptographic authentication | ||
| - Cases requiring file transfers | ||
|
|
||
| ### Telnet is suitable for: | ||
| - Legacy equipment without SSH support | ||
| - Lab and test environments | ||
| - Devices with limited computational resources | ||
| - Connection debugging and diagnostics | ||
|
|
||
| ## Default Configuration | ||
|
|
||
| If `streamer_type` is not explicitly specified, SSH is used as the more secure default option. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No streamer arg in
set_host_params()