diff --git a/cmd/serve/ftp/ftp.go b/cmd/serve/ftp/ftp.go index 22ca6e87e..9399aa989 100644 --- a/cmd/serve/ftp/ftp.go +++ b/cmd/serve/ftp/ftp.go @@ -15,7 +15,6 @@ import ( "strconv" "sync" - ftp "github.com/goftp/server" "github.com/pkg/errors" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/serve/proxy" @@ -29,6 +28,7 @@ import ( "github.com/rclone/rclone/vfs/vfsflags" "github.com/spf13/cobra" "github.com/spf13/pflag" + ftp "goftp.io/server" ) // Options contains options for the http Server @@ -155,7 +155,7 @@ func newServer(f fs.Fs, opt *Options) (*server, error) { PassivePorts: opt.PassivePorts, Auth: s, // implemented by CheckPasswd method Logger: &Logger{}, - //TODO implement a maximum of https://godoc.org/github.com/goftp/server#ServerOpts + //TODO implement a maximum of https://godoc.org/goftp.io/server#ServerOpts } s.srv = ftp.NewServer(ftpopt) return s, nil @@ -210,8 +210,8 @@ func (l *Logger) PrintResponse(sessionID string, code int, message string) { // CheckPassword is called with the connection. func findID(callerName []byte) (string, error) { // Dump the stack in this format - // github.com/rclone/rclone/vendor/github.com/goftp/server.(*Conn).Serve(0xc0000b2680) - // /home/ncw/go/src/github.com/rclone/rclone/vendor/github.com/goftp/server/conn.go:116 +0x11d + // github.com/rclone/rclone/vendor/goftp.io/server.(*Conn).Serve(0xc0000b2680) + // /home/ncw/go/src/github.com/rclone/rclone/vendor/goftp.io/server/conn.go:116 +0x11d buf := make([]byte, 4096) n := runtime.Stack(buf, false) buf = buf[:n] diff --git a/cmd/serve/ftp/ftp_test.go b/cmd/serve/ftp/ftp_test.go index b411a69a1..215f692d0 100644 --- a/cmd/serve/ftp/ftp_test.go +++ b/cmd/serve/ftp/ftp_test.go @@ -11,7 +11,6 @@ import ( "fmt" "testing" - ftp "github.com/goftp/server" _ "github.com/rclone/rclone/backend/local" "github.com/rclone/rclone/cmd/serve/servetest" "github.com/rclone/rclone/fs" @@ -19,6 +18,7 @@ import ( "github.com/rclone/rclone/fs/config/obscure" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + ftp "goftp.io/server" ) const ( diff --git a/go.mod b/go.mod index eea6ae576..75d05bc97 100644 --- a/go.mod +++ b/go.mod @@ -16,8 +16,6 @@ require ( github.com/coreos/bbolt v1.3.3 github.com/djherbis/times v1.2.0 github.com/dropbox/dropbox-sdk-go-unofficial v5.4.0+incompatible - github.com/goftp/file-driver v0.0.0-20180502053751-5d604a0fc0c9 // indirect - github.com/goftp/server v0.0.0-20190712054601-1149070ae46b github.com/google/go-cmp v0.3.1 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f // indirect @@ -56,6 +54,7 @@ require ( github.com/youmark/pkcs8 v0.0.0-20181201043747-70daafe5d78a github.com/yunify/qingstor-sdk-go/v3 v3.0.2 go.etcd.io/bbolt v1.3.3 // indirect + goftp.io/server v0.0.0-20190812052725-72a57b186803 golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 diff --git a/go.sum b/go.sum index b70657056..5461b6f3f 100644 --- a/go.sum +++ b/go.sum @@ -7,6 +7,9 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.3 h1:0sMegbmn/8uTwpNkB0q9cLEpZ2W5a6kl+wtBQgPWBJQ= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +gitea.com/goftp/file-driver v0.0.0-20190712091345-f79c2ed973f8/go.mod h1:ghdogu0Da3rwYCSJ20JPgTiMcDpzeRbzvuFIOOW3G7w= +gitea.com/goftp/file-driver v0.0.0-20190812052443-efcdcba68b34 h1:3wshUWDKHcy8hrNafCS4rtuAdON2KYsuznc05zdHTrQ= +gitea.com/goftp/file-driver v0.0.0-20190812052443-efcdcba68b34/go.mod h1:6+f1gclV97PmaVmE4YJbH3KIKnl+r3/HWR0zD/z1CG4= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= @@ -78,8 +81,7 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/goftp/file-driver v0.0.0-20180502053751-5d604a0fc0c9 h1:cC0Hbb+18DJ4i6ybqDybvj4wdIDS4vnD0QEci98PgM8= github.com/goftp/file-driver v0.0.0-20180502053751-5d604a0fc0c9/go.mod h1:GpOj6zuVBG3Inr9qjEnuVTgBlk2lZ1S9DcoFiXWyKss= -github.com/goftp/server v0.0.0-20190712054601-1149070ae46b h1:2rRhW1AEs/240C6fpmgGFKlTnh/339r2Cg+ahrkSodo= -github.com/goftp/server v0.0.0-20190712054601-1149070ae46b/go.mod h1:k/SS6VWkxY7dHPhoMQ8IdRu8L4lQtmGbhyXGg+vCnXE= +github.com/goftp/server v0.0.0-20190304020633-eabccc535b5a/go.mod h1:k/SS6VWkxY7dHPhoMQ8IdRu8L4lQtmGbhyXGg+vCnXE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -122,6 +124,7 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf/go.mod h1:lli8NYPQOFy3O++YmYbqVgOcQ1JPCwdOy+5zSjKJ9qY= github.com/jlaffaye/ftp v0.0.0-20190721194432-7cd8b0bcf3fc h1:Mc2Gk3kF0Uqx+cI97pN0gbgZb0DVW2L+htrZSKkOmtE= github.com/jlaffaye/ftp v0.0.0-20190721194432-7cd8b0bcf3fc/go.mod h1:lli8NYPQOFy3O++YmYbqVgOcQ1JPCwdOy+5zSjKJ9qY= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= @@ -245,6 +248,10 @@ go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +goftp.io/server v0.0.0-20190712054601-1149070ae46b/go.mod h1:xreggPYu7ZuNe9PfbxiQca7bYGwU44IvlCCg3KzWJtQ= +goftp.io/server v0.0.0-20190812034929-9b3874d17690/go.mod h1:99FISrRpwKfaL4Ey/dX8N48WToveng/s2OXR5sJ3cnc= +goftp.io/server v0.0.0-20190812052725-72a57b186803 h1:I2IgXYRuOZ6LceE7VY6aSnYuUy6Wot3WFhqI5WsAHXQ= +goftp.io/server v0.0.0-20190812052725-72a57b186803/go.mod h1:eDjthxa5tFTS2JVry2jHt1g9y3J0Vgu2Nd+lmNWev7Y= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/vendor/github.com/goftp/server/.gitignore b/vendor/github.com/goftp/server/.gitignore deleted file mode 100644 index fae1bc987..000000000 --- a/vendor/github.com/goftp/server/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -testdata -coverage.txt \ No newline at end of file diff --git a/vendor/github.com/goftp/server/circle.yml b/vendor/github.com/goftp/server/circle.yml deleted file mode 100644 index 63c11ef8c..000000000 --- a/vendor/github.com/goftp/server/circle.yml +++ /dev/null @@ -1,14 +0,0 @@ -dependencies: - override: - - mkdir -p ~/.go_workspace/src/github.com/goftp - - ln -s ${HOME}/${CIRCLE_PROJECT_REPONAME} ${HOME}/.go_workspace/src/github.com/goftp/${CIRCLE_PROJECT_REPONAME} - # './...' is a relative pattern which means all subdirectories - - go get -t -d -v ./... - - go build -v - -test: - override: - # './...' is a relative pattern which means all subdirectories - - go test -v -race -coverprofile=coverage.txt -covermode=atomic - post: - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/goftp/server/.drone.yml b/vendor/goftp.io/server/.drone.yml similarity index 100% rename from vendor/github.com/goftp/server/.drone.yml rename to vendor/goftp.io/server/.drone.yml diff --git a/vendor/goftp.io/server/.gitignore b/vendor/goftp.io/server/.gitignore new file mode 100644 index 000000000..287611d73 --- /dev/null +++ b/vendor/goftp.io/server/.gitignore @@ -0,0 +1,3 @@ +testdata +coverage.txt +exampleftpd/exampleftpd \ No newline at end of file diff --git a/vendor/github.com/goftp/server/LICENSE b/vendor/goftp.io/server/LICENSE similarity index 100% rename from vendor/github.com/goftp/server/LICENSE rename to vendor/goftp.io/server/LICENSE diff --git a/vendor/github.com/goftp/server/README.md b/vendor/goftp.io/server/README.md similarity index 79% rename from vendor/github.com/goftp/server/README.md rename to vendor/goftp.io/server/README.md index 792aaf7d2..1bb16c55f 100644 --- a/vendor/github.com/goftp/server/README.md +++ b/vendor/goftp.io/server/README.md @@ -1,12 +1,11 @@ # server -[![CircleCI](https://circleci.com/gh/goftp/server.svg?style=shield)](https://circleci.com/gh/goftp/server) -[![](https://goreportcard.com/badge/github.com/goftp/server)](https://goreportcard.com/report/github.com/goftp/server) -[![codecov](https://codecov.io/gh/goftp/server/branch/master/graph/badge.svg)](https://codecov.io/gh/goftp/server) +[![Build Status](https://drone.gitea.com/api/badges/goftp/server/status.svg)](https://drone.gitea.com/goftp/server) [![](http://gocover.io/_badge/gitea.com/goftp/server)](http://gocover.io/gitea.com/goftp/server) +[![](https://goreportcard.com/badge/gitea.com/goftp/server)](https://goreportcard.com/report/gitea.com/goftp/server) A FTP server framework forked from [github.com/yob/graval](http://github.com/yob/graval) and changed a lot. -Full documentation for the package is available on [godoc](http://godoc.org/github.com/goftp/server) +Full documentation for the package is available on [godoc](http://godoc.org/goftp.io/server) ## Version @@ -14,21 +13,21 @@ Full documentation for the package is available on [godoc](http://godoc.org/gith ## Installation - go get github.com/goftp/server + go get goftp.io/server ## Usage To boot a FTP server you will need to provide a driver that speaks to your persistence layer - the required driver contract is in [the -documentation](http://godoc.org/github.com/goftp/server). +documentation](http://godoc.org/goftp.io/server). -Look at the [file driver](https://github.com/goftp/file-driver) to see +Look at the [file driver](https://gitea.com/goftp/file-driver) to see an example of how to build a backend. There is a [sample ftp server](/exampleftpd) as a demo. You can build it with this command: - go install github.com/goftp/server/exampleftpd + go install goftp.io/server/exampleftpd Then run it if you have add $GOPATH to your $PATH: @@ -46,7 +45,7 @@ This uses the file driver mentioned above to serve files. ## Contributors -see [https://github.com/goftp/server/graphs/contributors](https://github.com/goftp/server/graphs/contributors) +see [https://gitea.com/goftp/server/graphs/contributors](https://gitea.com/goftp/server/graphs/contributors) ## Warning diff --git a/vendor/github.com/goftp/server/auth.go b/vendor/goftp.io/server/auth.go similarity index 100% rename from vendor/github.com/goftp/server/auth.go rename to vendor/goftp.io/server/auth.go diff --git a/vendor/github.com/goftp/server/cmd.go b/vendor/goftp.io/server/cmd.go similarity index 100% rename from vendor/github.com/goftp/server/cmd.go rename to vendor/goftp.io/server/cmd.go diff --git a/vendor/github.com/goftp/server/conn.go b/vendor/goftp.io/server/conn.go similarity index 100% rename from vendor/github.com/goftp/server/conn.go rename to vendor/goftp.io/server/conn.go diff --git a/vendor/github.com/goftp/server/doc.go b/vendor/goftp.io/server/doc.go similarity index 100% rename from vendor/github.com/goftp/server/doc.go rename to vendor/goftp.io/server/doc.go diff --git a/vendor/github.com/goftp/server/driver.go b/vendor/goftp.io/server/driver.go similarity index 100% rename from vendor/github.com/goftp/server/driver.go rename to vendor/goftp.io/server/driver.go diff --git a/vendor/github.com/goftp/server/fileinfo.go b/vendor/goftp.io/server/fileinfo.go similarity index 100% rename from vendor/github.com/goftp/server/fileinfo.go rename to vendor/goftp.io/server/fileinfo.go diff --git a/vendor/goftp.io/server/go.mod b/vendor/goftp.io/server/go.mod new file mode 100644 index 000000000..b6671ce79 --- /dev/null +++ b/vendor/goftp.io/server/go.mod @@ -0,0 +1,9 @@ +module goftp.io/server + +go 1.12 + +require ( + gitea.com/goftp/file-driver v0.0.0-20190812052443-efcdcba68b34 + github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf + github.com/stretchr/testify v1.3.0 +) diff --git a/vendor/goftp.io/server/go.sum b/vendor/goftp.io/server/go.sum new file mode 100644 index 000000000..f8d05e094 --- /dev/null +++ b/vendor/goftp.io/server/go.sum @@ -0,0 +1,14 @@ +gitea.com/goftp/file-driver v0.0.0-20190712091345-f79c2ed973f8/go.mod h1:ghdogu0Da3rwYCSJ20JPgTiMcDpzeRbzvuFIOOW3G7w= +gitea.com/goftp/file-driver v0.0.0-20190812052443-efcdcba68b34 h1:3wshUWDKHcy8hrNafCS4rtuAdON2KYsuznc05zdHTrQ= +gitea.com/goftp/file-driver v0.0.0-20190812052443-efcdcba68b34/go.mod h1:6+f1gclV97PmaVmE4YJbH3KIKnl+r3/HWR0zD/z1CG4= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf h1:2IYBd5TD/maMqTU2YUzp2tJL4cNaOYQ9EBullN9t9pk= +github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf/go.mod h1:lli8NYPQOFy3O++YmYbqVgOcQ1JPCwdOy+5zSjKJ9qY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +goftp.io/server v0.0.0-20190712054601-1149070ae46b/go.mod h1:xreggPYu7ZuNe9PfbxiQca7bYGwU44IvlCCg3KzWJtQ= +goftp.io/server v0.0.0-20190812034929-9b3874d17690/go.mod h1:99FISrRpwKfaL4Ey/dX8N48WToveng/s2OXR5sJ3cnc= diff --git a/vendor/github.com/goftp/server/listformatter.go b/vendor/goftp.io/server/listformatter.go similarity index 100% rename from vendor/github.com/goftp/server/listformatter.go rename to vendor/goftp.io/server/listformatter.go diff --git a/vendor/github.com/goftp/server/logger.go b/vendor/goftp.io/server/logger.go similarity index 100% rename from vendor/github.com/goftp/server/logger.go rename to vendor/goftp.io/server/logger.go diff --git a/vendor/github.com/goftp/server/perm.go b/vendor/goftp.io/server/perm.go similarity index 100% rename from vendor/github.com/goftp/server/perm.go rename to vendor/goftp.io/server/perm.go diff --git a/vendor/github.com/goftp/server/server.go b/vendor/goftp.io/server/server.go similarity index 100% rename from vendor/github.com/goftp/server/server.go rename to vendor/goftp.io/server/server.go diff --git a/vendor/github.com/goftp/server/socket.go b/vendor/goftp.io/server/socket.go similarity index 100% rename from vendor/github.com/goftp/server/socket.go rename to vendor/goftp.io/server/socket.go diff --git a/vendor/modules.txt b/vendor/modules.txt index 53d317b0d..3d02cadc3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -85,8 +85,6 @@ github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common -# github.com/goftp/server v0.0.0-20190712054601-1149070ae46b -github.com/goftp/server # github.com/golang/protobuf v1.3.2 github.com/golang/protobuf/proto github.com/golang/protobuf/ptypes @@ -204,6 +202,8 @@ go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate +# goftp.io/server v0.0.0-20190812052725-72a57b186803 +goftp.io/server # golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish