http-simple

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

README

Simple HTTP example

This example shows how you can create a http.Client that has a transport that uses the SSH tunnel.

This example uses the SSH Agent for authentication (specified by option tunnel.WithAgent())

For simplicity we perform no host key checking (tunnel.WithHostKeyCallback(ssh.InsecureIgnoreHostKey())). To perform host key checking you have multiple options:

  • Use per-hop HostKeyCallback if set.
  • Else use per-hop KnownHostsPath if set.
  • Else use global HostKeyCB from config if set.
  • Else use global KnownHostsPath if set.
  • Else fall back to defaultKnownHostsPath() → ~/.ssh/known_hosts

Documentation

Overview

Package main implements a simple example of a tunneled HTTP client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL