Skip to content
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

Switching to moul.io/sshportal (canonical url) #86

Merged
merged 2 commits into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults: &defaults
working_directory: /go/src/github.com/moul/sshportal
working_directory: /go/src/moul.io/sshportal
docker:
- image: circleci/golang:1.11
environment:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# build
FROM golang:1.11 as builder
COPY . /go/src/github.com/moul/sshportal
WORKDIR /go/src/github.com/moul/sshportal
COPY . /go/src/moul.io/sshportal
WORKDIR /go/src/moul.io/sshportal
RUN make _docker_install

# minimal runtime
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[![CircleCI](https://circleci.com/gh/moul/sshportal.svg?style=svg)](https://circleci.com/gh/moul/sshportal)
[![Docker Build Status](https://img.shields.io/docker/build/moul/sshportal.svg)](https://hub.docker.com/r/moul/sshportal/)
[![Go Report Card](https://goreportcard.com/badge/github.com/moul/sshportal)](https://goreportcard.com/report/github.com/moul/sshportal)
[![GoDoc](https://godoc.org/github.com/moul/sshportal?status.svg)](https://godoc.org/github.com/moul/sshportal)
[![Go Report Card](https://goreportcard.com/moul.io/sshportal)](https://goreportcard.com/report/moul.io/sshportal)
[![GoDoc](https://godoc.org/moul.io/sshportal?status.svg)](https://godoc.org/moul.io/sshportal)
[![License](https://img.shields.io/github/license/moul/sshportal.svg)](https://github.com/moul/sshportal/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/moul/sshportal.svg)](https://github.com/moul/sshportal/releases)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmoul%2Fsshportal.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmoul%2Fsshportal?ref=badge_shield)
Expand Down Expand Up @@ -279,7 +279,7 @@ docker logs -f sshportal
Get the latest version using GO.

```sh
go get -u github.com/moul/sshportal
go get -u moul.io/sshportal
```

## portal alias (.ssh/config)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/moul/sshportal
module moul.io/sshportal

require (
cloud.google.com/go v0.33.1 // indirect
Expand All @@ -21,7 +21,7 @@ require (
github.com/jtolds/gls v4.2.1+incompatible // indirect
github.com/kr/pty v1.1.3
github.com/lib/pq v1.0.0 // indirect
github.com/mattn/go-colorable v0.0.0-20171111065953-6fcc0c1fd9b6 // indirect
github.com/mattn/go-colorable v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.4 // indirect
github.com/mattn/go-runewidth v0.0.3 // indirect
github.com/mattn/go-sqlite3 v1.10.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/mattn/go-colorable v0.0.0-20171111065953-6fcc0c1fd9b6 h1:G4Z3Qt5LMB7t8O2mvgRGe5Napynl/AXz+kEPvYXaggQ=
github.com/mattn/go-colorable v0.0.0-20171111065953-6fcc0c1fd9b6/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package main // import "moul.io/sshportal"

import (
"fmt"
Expand Down Expand Up @@ -36,7 +36,7 @@ func main() {
app.Name = path.Base(os.Args[0])
app.Author = "Manfred Touron"
app.Version = Version + " (" + GitSha + ")"
app.Email = "https://github.com/moul/sshportal"
app.Email = "https://moul.io/sshportal"
app.Commands = []cli.Command{
{
Name: "server",
Expand Down
5 changes: 3 additions & 2 deletions pkg/bastionsession/bastionsession.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bastionsession
package bastionsession // import "moul.io/sshportal/pkg/bastionsession"

import (
"errors"
Expand All @@ -9,9 +9,10 @@ import (
"time"

"github.com/moul/ssh"
"github.com/moul/sshportal/pkg/logtunnel"
"github.com/sabban/bastion/pkg/logchannel"
gossh "golang.org/x/crypto/ssh"

"moul.io/sshportal/pkg/logtunnel"
)

type ForwardData struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/logtunnel/logtunnel.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package logtunnel
package logtunnel // import "moul.io/sshportal/pkg/logtunnel"

import (
"encoding/binary"
Expand All @@ -18,8 +18,8 @@ type logTunnel struct {
type ForwardData struct {
DestinationHost string
DestinationPort uint32
SourceHost string
SourcePort uint32
SourceHost string
SourcePort uint32
}

func writeHeader(fd io.Writer, length int) {
Expand All @@ -34,7 +34,7 @@ func writeHeader(fd io.Writer, length int) {

func New(channel ssh.Channel, writer io.WriteCloser, host string) *logTunnel {
return &logTunnel{
host: host,
host: host,
channel: channel,
writer: writer,
}
Expand All @@ -45,7 +45,7 @@ func (l *logTunnel) Read(data []byte) (int, error) {
}

func (l *logTunnel) Write(data []byte) (int, error) {
writeHeader(l.writer, len(data) + len(l.host + ": "))
writeHeader(l.writer, len(data)+len(l.host+": "))
l.writer.Write([]byte(l.host + ": "))
l.writer.Write(data)

Expand Down
3 changes: 2 additions & 1 deletion ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import (

"github.com/jinzhu/gorm"
"github.com/moul/ssh"
"github.com/moul/sshportal/pkg/bastionsession"
gossh "golang.org/x/crypto/ssh"

"moul.io/sshportal/pkg/bastionsession"
)

type sshportalContextKey string
Expand Down