mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
rename module to gitlab.com/demodesk/neko/server.
This commit is contained in:
parent
aa556b7839
commit
94c17e9a42
@ -5,9 +5,9 @@ import (
|
|||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko"
|
neko "gitlab.com/demodesk/neko/server"
|
||||||
"demodesk/neko/cmd"
|
"gitlab.com/demodesk/neko/server/cmd"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -15,8 +15,8 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"demodesk/neko"
|
neko "gitlab.com/demodesk/neko/server"
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Execute() error {
|
func Execute() error {
|
||||||
|
20
cmd/serve.go
20
cmd/serve.go
@ -8,16 +8,16 @@ import (
|
|||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"demodesk/neko/internal/api"
|
"gitlab.com/demodesk/neko/server/internal/api"
|
||||||
"demodesk/neko/internal/capture"
|
"gitlab.com/demodesk/neko/server/internal/capture"
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/desktop"
|
"gitlab.com/demodesk/neko/server/internal/desktop"
|
||||||
"demodesk/neko/internal/http"
|
"gitlab.com/demodesk/neko/server/internal/http"
|
||||||
"demodesk/neko/internal/member"
|
"gitlab.com/demodesk/neko/server/internal/member"
|
||||||
"demodesk/neko/internal/session"
|
"gitlab.com/demodesk/neko/server/internal/session"
|
||||||
"demodesk/neko/internal/webrtc"
|
"gitlab.com/demodesk/neko/server/internal/webrtc"
|
||||||
"demodesk/neko/internal/websocket"
|
"gitlab.com/demodesk/neko/server/internal/websocket"
|
||||||
"demodesk/neko/modules"
|
"gitlab.com/demodesk/neko/server/modules"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module demodesk/neko
|
module gitlab.com/demodesk/neko/server
|
||||||
|
|
||||||
go 1.17
|
go 1.17
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MemberBulkUpdatePayload struct {
|
type MemberBulkUpdatePayload struct {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MemberDataPayload struct {
|
type MemberDataPayload struct {
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi"
|
"github.com/go-chi/chi"
|
||||||
|
|
||||||
"demodesk/neko/internal/http/auth"
|
"gitlab.com/demodesk/neko/server/internal/http/auth"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type key int
|
type key int
|
||||||
|
@ -3,9 +3,9 @@ package room
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BroadcastStatusPayload struct {
|
type BroadcastStatusPayload struct {
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ClipboardPayload struct {
|
type ClipboardPayload struct {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi"
|
"github.com/go-chi/chi"
|
||||||
|
|
||||||
"demodesk/neko/internal/http/auth"
|
"gitlab.com/demodesk/neko/server/internal/http/auth"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ControlStatusPayload struct {
|
type ControlStatusPayload struct {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/http/auth"
|
"gitlab.com/demodesk/neko/server/internal/http/auth"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RoomHandler struct {
|
type RoomHandler struct {
|
||||||
|
@ -3,8 +3,8 @@ package room
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type KeyboardMapData struct {
|
type KeyboardMapData struct {
|
||||||
|
@ -4,10 +4,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ScreenConfigurationPayload struct {
|
type ScreenConfigurationPayload struct {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Extract file uploading to custom utility.
|
// TODO: Extract file uploading to custom utility.
|
||||||
|
@ -5,12 +5,12 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/api/members"
|
"gitlab.com/demodesk/neko/server/internal/api/members"
|
||||||
"demodesk/neko/internal/api/room"
|
"gitlab.com/demodesk/neko/server/internal/api/room"
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/http/auth"
|
"gitlab.com/demodesk/neko/server/internal/http/auth"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ApiManagerCtx struct {
|
type ApiManagerCtx struct {
|
||||||
|
@ -3,9 +3,9 @@ package api
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/http/auth"
|
"gitlab.com/demodesk/neko/server/internal/http/auth"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SessionLoginPayload struct {
|
type SessionLoginPayload struct {
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/capture/gst"
|
"gitlab.com/demodesk/neko/server/internal/capture/gst"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BroacastManagerCtx struct {
|
type BroacastManagerCtx struct {
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
|
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/codec"
|
"gitlab.com/demodesk/neko/server/internal/types/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CaptureManagerCtx struct {
|
type CaptureManagerCtx struct {
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/capture/gst"
|
"gitlab.com/demodesk/neko/server/internal/capture/gst"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// timeout between intervals, when screencast pipeline is checked
|
// timeout between intervals, when screencast pipeline is checked
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/capture/gst"
|
"gitlab.com/demodesk/neko/server/internal/capture/gst"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/codec"
|
"gitlab.com/demodesk/neko/server/internal/types/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var moveSinkListenerMu = sync.Mutex{}
|
var moveSinkListenerMu = sync.Mutex{}
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/capture/gst"
|
"gitlab.com/demodesk/neko/server/internal/capture/gst"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/codec"
|
"gitlab.com/demodesk/neko/server/internal/types/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StreamSrcManagerCtx struct {
|
type StreamSrcManagerCtx struct {
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/codec"
|
"gitlab.com/demodesk/neko/server/internal/types/codec"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Capture struct {
|
type Capture struct {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"demodesk/neko/internal/member/file"
|
"gitlab.com/demodesk/neko/server/internal/member/file"
|
||||||
"demodesk/neko/internal/member/object"
|
"gitlab.com/demodesk/neko/server/internal/member/object"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Member struct {
|
type Member struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
|
@ -8,8 +8,8 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// default stun server
|
// default stun server
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *DesktopManagerCtx) ClipboardGetText() (*types.ClipboardText, error) {
|
func (manager *DesktopManagerCtx) ClipboardGetText() (*types.ClipboardText, error) {
|
||||||
|
@ -3,7 +3,7 @@ package desktop
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"demodesk/neko/internal/desktop/drop"
|
"gitlab.com/demodesk/neko/server/internal/desktop/drop"
|
||||||
)
|
)
|
||||||
|
|
||||||
// repeat move event multiple times
|
// repeat move event multiple times
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"demodesk/neko/internal/desktop/xorg"
|
"gitlab.com/demodesk/neko/server/internal/desktop/xorg"
|
||||||
)
|
)
|
||||||
|
|
||||||
// name of the window that is being controlled
|
// name of the window that is being controlled
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/desktop/xevent"
|
"gitlab.com/demodesk/neko/server/internal/desktop/xevent"
|
||||||
"demodesk/neko/internal/desktop/xorg"
|
"gitlab.com/demodesk/neko/server/internal/desktop/xorg"
|
||||||
)
|
)
|
||||||
|
|
||||||
var mu = sync.Mutex{}
|
var mu = sync.Mutex{}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package desktop
|
package desktop
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/desktop/xevent"
|
"gitlab.com/demodesk/neko/server/internal/desktop/xevent"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *DesktopManagerCtx) OnCursorChanged(listener func(serial uint64)) {
|
func (manager *DesktopManagerCtx) OnCursorChanged(listener func(serial uint64)) {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"demodesk/neko/internal/desktop/xorg"
|
"gitlab.com/demodesk/neko/server/internal/desktop/xorg"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *DesktopManagerCtx) Move(x, y int) {
|
func (manager *DesktopManagerCtx) Move(x, y int) {
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
"image/color"
|
"image/color"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate ./keysymdef.sh
|
//go:generate ./keysymdef.sh
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type key int
|
type key int
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi"
|
"github.com/go-chi/chi"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func pprofHandler(r types.Router) {
|
func pprofHandler(r types.Router) {
|
||||||
|
@ -8,8 +8,8 @@ import (
|
|||||||
"github.com/go-chi/chi/middleware"
|
"github.com/go-chi/chi/middleware"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type logFormatter struct {
|
type logFormatter struct {
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HttpManagerCtx struct {
|
type HttpManagerCtx struct {
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"github.com/go-chi/chi/middleware"
|
"github.com/go-chi/chi/middleware"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
|
|
||||||
"demodesk/neko/internal/http/auth"
|
"gitlab.com/demodesk/neko/server/internal/http/auth"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type router struct {
|
type router struct {
|
||||||
|
@ -3,7 +3,7 @@ package dummy
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New() types.MemberProvider {
|
func New() types.MemberProvider {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New(config Config) types.MemberProvider {
|
func New(config Config) types.MemberProvider {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package file
|
package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MemberEntry struct {
|
type MemberEntry struct {
|
||||||
|
@ -7,11 +7,11 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/member/dummy"
|
"gitlab.com/demodesk/neko/server/internal/member/dummy"
|
||||||
"demodesk/neko/internal/member/file"
|
"gitlab.com/demodesk/neko/server/internal/member/file"
|
||||||
"demodesk/neko/internal/member/object"
|
"gitlab.com/demodesk/neko/server/internal/member/object"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New(sessions types.SessionManager, config *config.Member) *MemberManagerCtx {
|
func New(sessions types.SessionManager, config *config.Member) *MemberManagerCtx {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package object
|
package object
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New(config Config) types.MemberProvider {
|
func New(config Config) types.MemberProvider {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package object
|
package object
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MemberEntry struct {
|
type MemberEntry struct {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *SessionManagerCtx) CookieSetToken(w http.ResponseWriter, token string) {
|
func (manager *SessionManagerCtx) CookieSetToken(w http.ResponseWriter, token string) {
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New(config *config.Session) *SessionManagerCtx {
|
func New(config *config.Session) *SessionManagerCtx {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
|
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SessionCtx struct {
|
type SessionCtx struct {
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/PaesslerAG/gval"
|
"github.com/PaesslerAG/gval"
|
||||||
"github.com/pion/webrtc/v3/pkg/media"
|
"github.com/pion/webrtc/v3/pkg/media"
|
||||||
|
|
||||||
"demodesk/neko/internal/types/codec"
|
"gitlab.com/demodesk/neko/server/internal/types/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,7 +3,7 @@ package message
|
|||||||
import (
|
import (
|
||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewImage(desktop types.DesktopManager) *ImageCtx {
|
func NewImage(desktop types.DesktopManager) *ImageCtx {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/webrtc/payload"
|
"gitlab.com/demodesk/neko/server/internal/webrtc/payload"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *WebRTCManagerCtx) handle(data []byte, session types.Session) error {
|
func (manager *WebRTCManagerCtx) handle(data []byte, session types.Session) error {
|
||||||
|
@ -13,13 +13,13 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/config"
|
"gitlab.com/demodesk/neko/server/internal/config"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/codec"
|
"gitlab.com/demodesk/neko/server/internal/types/codec"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
"demodesk/neko/internal/webrtc/cursor"
|
"gitlab.com/demodesk/neko/server/internal/webrtc/cursor"
|
||||||
"demodesk/neko/internal/webrtc/pionlog"
|
"gitlab.com/demodesk/neko/server/internal/webrtc/pionlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// the duration without network activity before a Agent is considered disconnected. Default is 5 Seconds
|
// the duration without network activity before a Agent is considered disconnected. Default is 5 Seconds
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WebRTCPeerCtx struct {
|
type WebRTCPeerCtx struct {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/types/codec"
|
|
||||||
"demodesk/neko/internal/webrtc/pionlog"
|
|
||||||
|
|
||||||
"github.com/pion/interceptor"
|
"github.com/pion/interceptor"
|
||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
|
|
||||||
|
"gitlab.com/demodesk/neko/server/internal/types/codec"
|
||||||
|
"gitlab.com/demodesk/neko/server/internal/webrtc/pionlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *WebRTCManagerCtx) newPeerConnection(codecs []codec.RTPCodec, logger zerolog.Logger) (*webrtc.PeerConnection, error) {
|
func (manager *WebRTCManagerCtx) newPeerConnection(codecs []codec.RTPCodec, logger zerolog.Logger) (*webrtc.PeerConnection, error) {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/types"
|
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
@ -9,6 +8,8 @@ import (
|
|||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
"github.com/pion/webrtc/v3/pkg/media"
|
"github.com/pion/webrtc/v3/pkg/media"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
|
|
||||||
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *WebRTCManagerCtx) newPeerStreamTrack(stream types.StreamSinkManager, logger zerolog.Logger) (*PeerStreamTrack, error) {
|
func (manager *WebRTCManagerCtx) newPeerStreamTrack(stream types.StreamSinkManager, logger zerolog.Logger) (*PeerStreamTrack, error) {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/webrtc/payload"
|
"gitlab.com/demodesk/neko/server/internal/webrtc/payload"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (peer *WebRTCPeerCtx) SendCursorPosition(x, y int) error {
|
func (peer *WebRTCPeerCtx) SendCursorPosition(x, y int) error {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package websocket
|
package websocket
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (manager *WebSocketManagerCtx) fileChooserDialogEvents() {
|
func (manager *WebSocketManagerCtx) fileChooserDialogEvents() {
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) clipboardSet(session types.Session, payload *message.ClipboardData) error {
|
func (h *MessageHandlerCtx) clipboardSet(session types.Session, payload *message.ClipboardData) error {
|
||||||
|
@ -3,10 +3,10 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"demodesk/neko/internal/desktop/xorg"
|
"gitlab.com/demodesk/neko/server/internal/desktop/xorg"
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -4,10 +4,10 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New(
|
func New(
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) keyboardMap(session types.Session, payload *message.KeyboardMap) error {
|
func (h *MessageHandlerCtx) keyboardMap(session types.Session, payload *message.KeyboardMap) error {
|
||||||
|
@ -3,9 +3,9 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.ScreenSize) error {
|
func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.ScreenSize) error {
|
||||||
|
@ -3,9 +3,9 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) sendUnicast(session types.Session, payload *message.SendUnicast) error {
|
func (h *MessageHandlerCtx) sendUnicast(session types.Session, payload *message.SendUnicast) error {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) SessionCreated(session types.Session) error {
|
func (h *MessageHandlerCtx) SessionCreated(session types.Session) error {
|
||||||
|
@ -3,9 +3,9 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) signalRequest(session types.Session, payload *message.SignalVideo) error {
|
func (h *MessageHandlerCtx) signalRequest(session types.Session, payload *message.SignalVideo) error {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *MessageHandlerCtx) systemInit(session types.Session) error {
|
func (h *MessageHandlerCtx) systemInit(session types.Session) error {
|
||||||
|
@ -10,11 +10,11 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
"demodesk/neko/internal/utils"
|
"gitlab.com/demodesk/neko/server/internal/utils"
|
||||||
"demodesk/neko/internal/websocket/handler"
|
"gitlab.com/demodesk/neko/server/internal/websocket/handler"
|
||||||
)
|
)
|
||||||
|
|
||||||
// send pings to peer with this period - must be less than pongWait
|
// send pings to peer with this period - must be less than pongWait
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"demodesk/neko/internal/types"
|
"gitlab.com/demodesk/neko/server/internal/types"
|
||||||
"demodesk/neko/internal/types/event"
|
"gitlab.com/demodesk/neko/server/internal/types/event"
|
||||||
"demodesk/neko/internal/types/message"
|
"gitlab.com/demodesk/neko/server/internal/types/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WebSocketPeerCtx struct {
|
type WebSocketPeerCtx struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user