From 79459ff864708512bcf3fd2d7bf0d246e34a9ae8 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Wed, 7 Feb 2018 15:34:18 +0100 Subject: [PATCH] move to dev.sum7.eu --- .drone.yml | 2 +- cmd/server.go | 12 ++--- database/main.go | 2 +- main.go | 2 +- server/extension/iq.go | 4 +- server/extension/iq_disco.go | 6 +-- server/extension/iq_discovery.go | 4 +- server/extension/iq_last.go | 4 +- server/extension/iq_ping.go | 4 +- server/extension/iq_private.go | 4 +- server/extension/iq_private_bookmarks.go | 4 +- server/extension/iq_private_metacontacts.go | 4 +- server/extension/iq_private_roster.go | 4 +- server/extension/iq_roster.go | 6 +-- server/extension/main.go | 2 +- server/extension/message.go | 2 +- server/extension/presence.go | 4 +- server/server.go | 12 ++--- server/state/connect.go | 6 +-- server/state/normal.go | 4 +- server/state/state.go | 2 +- server/toclient/connect.go | 55 +++++++++++---------- server/toclient/register.go | 10 ++-- server/toserver/connect.go | 18 +++---- server/utils/client.go | 2 +- server/utils/main.go | 2 +- 26 files changed, 92 insertions(+), 89 deletions(-) diff --git a/.drone.yml b/.drone.yml index cfe9754..c1d9103 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ workspace: base: /go - path: src/github.com/genofire/yaja + path: src/dev.sum7.eu/genofire/yaja pipeline: build: diff --git a/cmd/server.go b/cmd/server.go index 8bd56e4..8a32883 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -10,13 +10,13 @@ import ( "golang.org/x/crypto/acme/autocert" - "github.com/genofire/yaja/database" - "github.com/genofire/yaja/model/config" - "github.com/genofire/yaja/server/extension" + "dev.sum7.eu/genofire/yaja/database" + "dev.sum7.eu/genofire/yaja/model/config" + "dev.sum7.eu/genofire/yaja/server/extension" - "github.com/genofire/golang-lib/file" - "github.com/genofire/golang-lib/worker" - "github.com/genofire/yaja/server" + "dev.sum7.eu/genofire/golang-lib/file" + "dev.sum7.eu/genofire/golang-lib/worker" + "dev.sum7.eu/genofire/yaja/server" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/database/main.go b/database/main.go index c093031..bf069f4 100644 --- a/database/main.go +++ b/database/main.go @@ -4,7 +4,7 @@ import ( "errors" "sync" - "github.com/genofire/yaja/model" + "dev.sum7.eu/genofire/yaja/model" log "github.com/sirupsen/logrus" ) diff --git a/main.go b/main.go index 2e00ee8..e7be7f7 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main -import "github.com/genofire/yaja/cmd" +import "dev.sum7.eu/genofire/yaja/cmd" func main() { cmd.Execute() diff --git a/server/extension/iq.go b/server/extension/iq.go index b47535b..13b83df 100644 --- a/server/extension/iq.go +++ b/server/extension/iq.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQExtensions []IQExtension diff --git a/server/extension/iq_disco.go b/server/extension/iq_disco.go index f5b44fd..ef74689 100644 --- a/server/extension/iq_disco.go +++ b/server/extension/iq_disco.go @@ -3,9 +3,9 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/database" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/database" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQDisco struct { diff --git a/server/extension/iq_discovery.go b/server/extension/iq_discovery.go index 4233295..b3fefc4 100644 --- a/server/extension/iq_discovery.go +++ b/server/extension/iq_discovery.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQExtensionDiscovery struct { diff --git a/server/extension/iq_last.go b/server/extension/iq_last.go index 259fd43..8df4891 100644 --- a/server/extension/iq_last.go +++ b/server/extension/iq_last.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) //TODO Draft diff --git a/server/extension/iq_ping.go b/server/extension/iq_ping.go index 62be193..6e64ae5 100644 --- a/server/extension/iq_ping.go +++ b/server/extension/iq_ping.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQPing struct { diff --git a/server/extension/iq_private.go b/server/extension/iq_private.go index b969662..bb82d27 100644 --- a/server/extension/iq_private.go +++ b/server/extension/iq_private.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQPrivate struct { diff --git a/server/extension/iq_private_bookmarks.go b/server/extension/iq_private_bookmarks.go index e6f9b86..bcaa653 100644 --- a/server/extension/iq_private_bookmarks.go +++ b/server/extension/iq_private_bookmarks.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQPrivateBookmark struct { diff --git a/server/extension/iq_private_metacontacts.go b/server/extension/iq_private_metacontacts.go index c525a62..bea4fb7 100644 --- a/server/extension/iq_private_metacontacts.go +++ b/server/extension/iq_private_metacontacts.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQPrivateMetacontact struct { diff --git a/server/extension/iq_private_roster.go b/server/extension/iq_private_roster.go index 554e0b9..539ef1c 100644 --- a/server/extension/iq_private_roster.go +++ b/server/extension/iq_private_roster.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQPrivateRoster struct { diff --git a/server/extension/iq_roster.go b/server/extension/iq_roster.go index 899ab4f..73b2109 100644 --- a/server/extension/iq_roster.go +++ b/server/extension/iq_roster.go @@ -3,9 +3,9 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/database" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/database" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type IQRoster struct { diff --git a/server/extension/main.go b/server/extension/main.go index cbdab2e..c5b99c3 100644 --- a/server/extension/main.go +++ b/server/extension/main.go @@ -3,7 +3,7 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/server/utils" ) type Extensions []Extension diff --git a/server/extension/message.go b/server/extension/message.go index 3daa310..2c3f656 100644 --- a/server/extension/message.go +++ b/server/extension/message.go @@ -3,7 +3,7 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/server/utils" ) type Message struct { diff --git a/server/extension/presence.go b/server/extension/presence.go index 3a2303e..4799fee 100644 --- a/server/extension/presence.go +++ b/server/extension/presence.go @@ -3,8 +3,8 @@ package extension import ( "encoding/xml" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/utils" ) type Presence struct { diff --git a/server/server.go b/server/server.go index b8d77a8..cab6d54 100644 --- a/server/server.go +++ b/server/server.go @@ -4,12 +4,12 @@ import ( "crypto/tls" "net" - "github.com/genofire/yaja/database" - "github.com/genofire/yaja/model" - "github.com/genofire/yaja/server/extension" - "github.com/genofire/yaja/server/toclient" - "github.com/genofire/yaja/server/toserver" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/database" + "dev.sum7.eu/genofire/yaja/model" + "dev.sum7.eu/genofire/yaja/server/extension" + "dev.sum7.eu/genofire/yaja/server/toclient" + "dev.sum7.eu/genofire/yaja/server/toserver" + "dev.sum7.eu/genofire/yaja/server/utils" log "github.com/sirupsen/logrus" "golang.org/x/crypto/acme/autocert" ) diff --git a/server/state/connect.go b/server/state/connect.go index 2f4baae..643553a 100644 --- a/server/state/connect.go +++ b/server/state/connect.go @@ -4,9 +4,9 @@ import ( "crypto/tls" "fmt" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/model" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/model" + "dev.sum7.eu/genofire/yaja/server/utils" "golang.org/x/crypto/acme/autocert" ) diff --git a/server/state/normal.go b/server/state/normal.go index a2e0245..bf7dc0c 100644 --- a/server/state/normal.go +++ b/server/state/normal.go @@ -1,8 +1,8 @@ package state import ( - "github.com/genofire/yaja/server/extension" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/server/extension" + "dev.sum7.eu/genofire/yaja/server/utils" ) // SendingClient state diff --git a/server/state/state.go b/server/state/state.go index 5ab35a7..2157d04 100644 --- a/server/state/state.go +++ b/server/state/state.go @@ -1,6 +1,6 @@ package state -import "github.com/genofire/yaja/server/utils" +import "dev.sum7.eu/genofire/yaja/server/utils" // State processes the stream and moves to the next state type State interface { diff --git a/server/toclient/connect.go b/server/toclient/connect.go index 8c4a983..088db2d 100644 --- a/server/toclient/connect.go +++ b/server/toclient/connect.go @@ -7,11 +7,11 @@ import ( "fmt" "strings" - "github.com/genofire/yaja/database" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/extension" - "github.com/genofire/yaja/server/state" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/database" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/extension" + "dev.sum7.eu/genofire/yaja/server/state" + "dev.sum7.eu/genofire/yaja/server/utils" "golang.org/x/crypto/acme/autocert" ) @@ -64,24 +64,26 @@ func (state *TLSStream) Process() state.State { return state } - fmt.Fprintf(state.Client.Conn, ` - `, - utils.CreateCookie(), messages.NSClient, messages.NSStream) - if state.domainRegisterAllowed(state.Client.JID) { - fmt.Fprintf(state.Client.Conn, ` - - PLAIN - - - `, + fmt.Fprintf(state.Client.Conn, ` + + + + + PLAIN + + `, + utils.CreateCookie(), messages.NSClient, messages.NSStream, messages.NSSASL, messages.NSFeaturesIQRegister) } else { - fmt.Fprintf(state.Client.Conn, ` - - PLAIN - - `, + fmt.Fprintf(state.Client.Conn, ` + + + + PLAIN + + `, + utils.CreateCookie(), messages.NSClient, messages.NSStream, messages.NSSASL) } @@ -166,12 +168,13 @@ func (state *AuthedStart) Process() state.State { return nil } fmt.Fprintf(state.Client.Conn, ` - `, - utils.CreateCookie(), messages.NSClient, messages.NSStream) - - fmt.Fprintf(state.Client.Conn, ` - - `, + + + + + + `, + messages.NSStream, state.Client.JID.Domain, utils.CreateCookie(), messages.NSClient, messages.NSBind) return state.Next diff --git a/server/toclient/register.go b/server/toclient/register.go index f2694ac..bedfdec 100644 --- a/server/toclient/register.go +++ b/server/toclient/register.go @@ -4,11 +4,11 @@ import ( "encoding/xml" "fmt" - "github.com/genofire/yaja/database" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/model" - "github.com/genofire/yaja/server/state" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/database" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/model" + "dev.sum7.eu/genofire/yaja/server/state" + "dev.sum7.eu/genofire/yaja/server/utils" ) type RegisterFormRequest struct { diff --git a/server/toserver/connect.go b/server/toserver/connect.go index ea28565..bb5a0ae 100644 --- a/server/toserver/connect.go +++ b/server/toserver/connect.go @@ -6,11 +6,11 @@ import ( "encoding/xml" "fmt" - "github.com/genofire/yaja/database" - "github.com/genofire/yaja/messages" - "github.com/genofire/yaja/server/extension" - "github.com/genofire/yaja/server/state" - "github.com/genofire/yaja/server/utils" + "dev.sum7.eu/genofire/yaja/database" + "dev.sum7.eu/genofire/yaja/messages" + "dev.sum7.eu/genofire/yaja/server/extension" + "dev.sum7.eu/genofire/yaja/server/state" + "dev.sum7.eu/genofire/yaja/server/utils" "golang.org/x/crypto/acme/autocert" ) @@ -90,14 +90,14 @@ func (state *TLSStream) Process() state.State { } fmt.Fprintf(state.Client.Conn, ` - `, - utils.CreateCookie(), messages.NSClient, messages.NSStream) - - fmt.Fprintf(state.Client.Conn, ` + + EXTERNAL + `, + utils.CreateCookie(), messages.NSClient, messages.NSStream, messages.NSSASL) return state.Next diff --git a/server/utils/client.go b/server/utils/client.go index eba19e4..479a1dc 100644 --- a/server/utils/client.go +++ b/server/utils/client.go @@ -4,7 +4,7 @@ import ( "encoding/xml" "net" - "github.com/genofire/yaja/model" + "dev.sum7.eu/genofire/yaja/model" log "github.com/sirupsen/logrus" ) diff --git a/server/utils/main.go b/server/utils/main.go index b5959f1..ecb094a 100644 --- a/server/utils/main.go +++ b/server/utils/main.go @@ -5,7 +5,7 @@ import ( "encoding/binary" "fmt" - "github.com/genofire/yaja/model" + "dev.sum7.eu/genofire/yaja/model" ) // Cookie is used to give a unique identifier to each request.