flatten mplexer into telebit package

This commit is contained in:
AJ ONeal 2020-07-20 16:20:59 -06:00
parent 644c136181
commit 7c4b65004d
50 changed files with 42 additions and 47 deletions

View File

@ -1,4 +1,4 @@
// +build !dev // +build !dev
//go:generate go run -mod vendor github.com/shurcooL/vfsgen/cmd/vfsgendev -source="git.coolaj86.com/coolaj86/go-telebitd/mplexer/admin".AdminFS //go:generate go run -mod vendor github.com/shurcooL/vfsgen/cmd/vfsgendev -source="git.rootprojects.org/root/telebit/admin".AdminFS
package admin package admin

View File

@ -10,7 +10,7 @@ import (
"os" "os"
"strings" "strings"
dns01 "git.coolaj86.com/coolaj86/go-telebitd/mplexer/dns01" dns01 "git.rootprojects.org/root/telebit/dns01"
jwt "github.com/dgrijalva/jwt-go" jwt "github.com/dgrijalva/jwt-go"
"github.com/go-acme/lego/v3/challenge" "github.com/go-acme/lego/v3/challenge"

View File

@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"os" "os"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
"github.com/denisbrodbeck/machineid" "github.com/denisbrodbeck/machineid"
_ "github.com/joho/godotenv/autoload" _ "github.com/joho/godotenv/autoload"

View File

@ -10,7 +10,7 @@ import (
"strings" "strings"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
"github.com/go-chi/chi" "github.com/go-chi/chi"
) )

View File

@ -10,7 +10,7 @@ import (
"os" "os"
"strings" "strings"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
"github.com/go-acme/lego/v3/challenge" "github.com/go-acme/lego/v3/challenge"
"github.com/go-acme/lego/v3/providers/dns/duckdns" "github.com/go-acme/lego/v3/providers/dns/duckdns"

View File

@ -9,7 +9,7 @@ import (
"strings" "strings"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
"github.com/dgrijalva/jwt-go" "github.com/dgrijalva/jwt-go"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/go-chi/chi/middleware" "github.com/go-chi/chi/middleware"

View File

@ -10,8 +10,8 @@ import (
"os" "os"
"strconv" "strconv"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
"github.com/denisbrodbeck/machineid" "github.com/denisbrodbeck/machineid"
_ "github.com/joho/godotenv/autoload" _ "github.com/joho/godotenv/autoload"

View File

@ -5,7 +5,7 @@ import (
"log" "log"
"strings" "strings"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
) )
func main() { func main() {

View File

@ -8,9 +8,9 @@ import (
"net/http" "net/http"
"sync" "sync"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
"git.coolaj86.com/coolaj86/go-telebitd/mplexer/admin" "git.rootprojects.org/root/telebit/admin"
"git.coolaj86.com/coolaj86/go-telebitd/table" "git.rootprojects.org/root/telebit/table"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"

View File

@ -5,7 +5,7 @@ import (
"net/http" "net/http"
"strings" "strings"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
) )
func NewAuthorizer(authURL string) telebit.Authorizer { func NewAuthorizer(authURL string) telebit.Authorizer {

View File

@ -18,13 +18,13 @@ import (
"strings" "strings"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt" "git.rootprojects.org/root/telebit/mgmt"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
tbDns01 "git.coolaj86.com/coolaj86/go-telebitd/mplexer/dns01" tbDns01 "git.rootprojects.org/root/telebit/dns01"
"git.coolaj86.com/coolaj86/go-telebitd/table" "git.rootprojects.org/root/telebit/table"
httpshim "git.coolaj86.com/coolaj86/go-telebitd/tunnel" httpshim "git.rootprojects.org/root/telebit/tunnel"
legoDns01 "github.com/go-acme/lego/v3/challenge/dns01" legoDns01 "github.com/go-acme/lego/v3/challenge/dns01"
"github.com/caddyserver/certmagic" "github.com/caddyserver/certmagic"

View File

@ -11,9 +11,9 @@ import (
"strings" "strings"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt" "git.rootprojects.org/root/telebit/mgmt"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
"github.com/denisbrodbeck/machineid" "github.com/denisbrodbeck/machineid"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"

View File

@ -14,9 +14,9 @@ import (
"sync" "sync"
"time" "time"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
tbDns01 "git.coolaj86.com/coolaj86/go-telebitd/mplexer/dns01" tbDns01 "git.rootprojects.org/root/telebit/dns01"
"git.coolaj86.com/coolaj86/go-telebitd/table" "git.rootprojects.org/root/telebit/table"
"github.com/caddyserver/certmagic" "github.com/caddyserver/certmagic"
"github.com/dgrijalva/jwt-go" "github.com/dgrijalva/jwt-go"

View File

@ -6,8 +6,8 @@ import (
"net" "net"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
"git.coolaj86.com/coolaj86/go-telebitd/sni" "git.rootprojects.org/root/telebit/sni"
) )
// ConnWrap is just a cheap way to DRY up some switch conn.(type) statements to handle special features of Conn // ConnWrap is just a cheap way to DRY up some switch conn.(type) statements to handle special features of Conn

View File

@ -1,5 +0,0 @@
#!/bin/bash
godebug build -instrument \
git.coolaj86.com/coolaj86/go-telebitd/connection,git.coolaj86.com/coolaj86/go-telebitd/connection \
-o debug .

View File

@ -5,7 +5,7 @@ import (
"io" "io"
"log" "log"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
) )
// Decoder handles a Reader stream containing mplexy-encoded clients // Decoder handles a Reader stream containing mplexy-encoded clients

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
"sync" "sync"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
) )
// TODO: try to be more like encoding/csv, or more like encoding/pem and encoding/json? // TODO: try to be more like encoding/csv, or more like encoding/pem and encoding/json?

View File

@ -1,4 +1,4 @@
// +build !dev // +build !dev
//go:generate go run -mod vendor github.com/shurcooL/vfsgen/cmd/vfsgendev -source="git.coolaj86.com/coolaj86/go-telebitd/mplexer/files".Assets //go:generate go run -mod vendor github.com/shurcooL/vfsgen/cmd/vfsgendev -source="git.rootprojects.org/root/telebit/files".Assets
package files package files

2
go.mod
View File

@ -1,4 +1,4 @@
module git.coolaj86.com/coolaj86/go-telebitd module git.rootprojects.org/root/telebit
go 1.14 go 1.14

View File

@ -6,9 +6,9 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
"git.coolaj86.com/coolaj86/go-telebitd/mgmt/authstore" "git.rootprojects.org/root/telebit/mgmt/authstore"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
) )
type SuccessResponse struct { type SuccessResponse struct {

View File

@ -9,7 +9,7 @@ import (
"os" "os"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
jwt "github.com/dgrijalva/jwt-go" jwt "github.com/dgrijalva/jwt-go"
) )

View File

@ -7,7 +7,7 @@ import (
"io/ioutil" "io/ioutil"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/mplexer/files" "git.rootprojects.org/root/telebit/files"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
// pq injects itself into sql as 'postgres' // pq injects itself into sql as 'postgres'

View File

@ -4,7 +4,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
) )
type Parser struct { type Parser struct {

View File

@ -9,8 +9,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
telebit "git.coolaj86.com/coolaj86/go-telebitd/mplexer" telebit "git.rootprojects.org/root/telebit"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )

View File

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
) )
const ( const (

View File

@ -10,7 +10,7 @@ import (
"strings" "strings"
"time" "time"
"git.coolaj86.com/coolaj86/go-telebitd/dbg" "git.rootprojects.org/root/telebit/dbg"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )