forked from v2ray/v2ray-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
massive refactoring for interoperability
- Loading branch information
1 parent
5a3c7fd
commit 292d7cc
Showing
66 changed files
with
1,504 additions
and
1,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
package app | ||
|
||
//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg app -path App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,3 @@ | ||
package dispatcher | ||
|
||
import ( | ||
"context" | ||
|
||
"v2ray.com/core/app" | ||
"v2ray.com/core/common/net" | ||
"v2ray.com/core/transport/ray" | ||
) | ||
|
||
// Interface dispatch a packet and possibly further network payload to its destination. | ||
type Interface interface { | ||
Dispatch(ctx context.Context, dest net.Destination) (ray.InboundRay, error) | ||
} | ||
|
||
func FromSpace(space app.Space) Interface { | ||
if app := space.GetApplication((*Interface)(nil)); app != nil { | ||
return app.(Interface) | ||
} | ||
return nil | ||
} | ||
//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg dispatcher -path App,Dispatcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package dispatcher | ||
|
||
import "v2ray.com/core/common/errors" | ||
|
||
func newError(values ...interface{}) *errors.Error { return errors.New(values...).Path("App", "Dispatcher") } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package impl | ||
package dispatcher | ||
|
||
import ( | ||
"bytes" | ||
|
5 changes: 2 additions & 3 deletions
5
app/dispatcher/impl/sniffer_test.go → app/dispatcher/sniffer_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.