Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pion/transport
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.1
Choose a base ref
...
head repository: pion/transport
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.2
Choose a head ref
  • 13 commits
  • 14 files changed
  • 4 contributors

Commits on Oct 1, 2023

  1. Update module golang.org/x/net to v0.15.0

    Generated by renovateBot
    renovate[bot] committed Oct 1, 2023
    Copy the full SHA
    fceb108 View commit details

Commits on Oct 8, 2023

  1. Update module golang.org/x/sys to v0.13.0

    Generated by renovateBot
    renovate[bot] committed Oct 8, 2023
    Copy the full SHA
    04416c6 View commit details

Commits on Oct 12, 2023

  1. Update module golang.org/x/net to v0.17.0 [SECURITY]

    Generated by renovateBot
    renovate[bot] committed Oct 12, 2023
    Copy the full SHA
    a342ccd View commit details

Commits on Dec 1, 2023

  1. Update module golang.org/x/net to v0.19.0

    Generated by renovateBot
    renovate[bot] committed Dec 1, 2023
    Copy the full SHA
    31fe7de View commit details

Commits on Jan 2, 2024

  1. Copy the full SHA
    c28f883 View commit details
  2. Copy the full SHA
    ce93c71 View commit details
  3. Update CI configs to v0.11.0

    Update lint scripts and CI configs.
    pionbot authored and Sean-Der committed Jan 2, 2024
    Copy the full SHA
    2eaddb3 View commit details

Commits on Jan 5, 2024

  1. Update CI configs to v0.11.3

    Update lint scripts and CI configs.
    pionbot authored and Sean-Der committed Jan 5, 2024
    Copy the full SHA
    b1d71d8 View commit details

Commits on Feb 7, 2024

  1. Update module golang.org/x/sys to v0.17.0

    Generated by renovateBot
    renovate[bot] committed Feb 7, 2024
    Copy the full SHA
    99f146f View commit details

Commits on Mar 17, 2024

  1. Fix linter errors

    golangci-lint upgrade to v1.56.2 added more checks
    
    Relates to pion/.goassets#201
    Sean-Der committed Mar 17, 2024
    Copy the full SHA
    b71802f View commit details
  2. Update module github.com/stretchr/testify to v1.9.0

    Generated by renovateBot
    renovate[bot] committed Mar 17, 2024
    Copy the full SHA
    1ae37c5 View commit details
  3. Update module golang.org/x/net to v0.22.0

    Generated by renovateBot
    renovate[bot] committed Mar 17, 2024
    Copy the full SHA
    eefb50c View commit details

Commits on Mar 27, 2024

  1. Update util_wasm.go for go1.22

    edaniels authored Mar 27, 2024
    Copy the full SHA
    4a53ae5 View commit details
Showing with 36 additions and 93 deletions.
  1. +0 −23 .github/workflows/generate-authors.yml
  2. +2 −2 .github/workflows/test.yaml
  3. +1 −1 .github/workflows/tidy-check.yaml
  4. +4 −15 .golangci.yml
  5. +0 −31 AUTHORS.txt
  6. +1 −1 README.md
  7. +3 −3 go.mod
  8. +14 −8 go.sum
  9. +3 −1 test/util_wasm.go
  10. +3 −3 vnet/conn_test.go
  11. +1 −1 vnet/router_test.go
  12. +1 −1 vnet/udpproxy.go
  13. +1 −1 vnet/udpproxy_direct.go
  14. +2 −2 vnet/udpproxy_direct_test.go
23 changes: 0 additions & 23 deletions .github/workflows/generate-authors.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
uses: pion/.goassets/.github/workflows/test.reusable.yml@master
strategy:
matrix:
go: ['1.20', '1.19'] # auto-update/supported-go-version-list
go: ['1.21', '1.20'] # auto-update/supported-go-version-list
fail-fast: false
with:
go-version: ${{ matrix.go }}
@@ -32,7 +32,7 @@ jobs:
uses: pion/.goassets/.github/workflows/test-i386.reusable.yml@master
strategy:
matrix:
go: ['1.20', '1.19'] # auto-update/supported-go-version-list
go: ['1.21', '1.20'] # auto-update/supported-go-version-list
fail-fast: false
with:
go-version: ${{ matrix.go }}
2 changes: 1 addition & 1 deletion .github/workflows/tidy-check.yaml
Original file line number Diff line number Diff line change
@@ -22,4 +22,4 @@ jobs:
tidy:
uses: pion/.goassets/.github/workflows/tidy-check.reusable.yml@master
with:
go-version: '1.20' # auto-update/latest-go-version
go-version: '1.21' # auto-update/latest-go-version
19 changes: 4 additions & 15 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@ linters:
- bodyclose # checks whether HTTP response body is closed successfully
- contextcheck # check the function whether use a non-inherited context
- decorder # check declaration order and count of types, constants, variables and functions
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
- dupl # Tool for code clone detection
- durationcheck # check for two durations multiplied together
@@ -63,7 +62,6 @@ linters:
- importas # Enforces consistent import aliases
- ineffassign # Detects when assignments to existing variables are not used
- misspell # Finds commonly misspelled English words in comments
- nakedret # Finds naked returns in functions greater than a specified function length
- nilerr # Finds the code that returns nil even if it checks that the error is not nil.
- nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value.
- noctx # noctx finds sending http request without context.Context
@@ -81,6 +79,7 @@ linters:
- wastedassign # wastedassign finds wasted assignment statements
- whitespace # Tool for detection of leading and trailing whitespace
disable:
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- containedctx # containedctx is a linter that detects struct contained context.Context field
- cyclop # checks function and package cyclomatic complexity
- exhaustivestruct # Checks if all struct's fields are initialized
@@ -94,6 +93,7 @@ linters:
- maintidx # maintidx measures the maintainability index of each function.
- makezero # Finds slice declarations with non-zero initial length
- maligned # Tool to detect Go structs that would take less memory if their fields were sorted
- nakedret # Finds naked returns in functions greater than a specified function length
- nestif # Reports deeply nested if statements
- nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
- nolintlint # Reports ill-formed or insufficient nolint directives
@@ -111,22 +111,11 @@ linters:
issues:
exclude-use-default: false
exclude-rules:
# Allow complex tests, better to be self contained
- path: _test\.go
# Allow complex tests and examples, better to be self contained
- path: (examples|main\.go|_test\.go)
linters:
- gocognit
- forbidigo

# Allow complex main function in examples
- path: examples
text: "of func `main` is high"
linters:
- gocognit

# Allow forbidden identifiers in examples
- path: examples
linters:
- forbidigo

# Allow forbidden identifiers in CLI commands
- path: cmd
31 changes: 0 additions & 31 deletions AUTHORS.txt

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ We are always looking to support **your projects**. Please reach out if you have
If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)

### Contributing
Check out the [contributing wiki](https://github.com/pion/webrtc/wiki/Contributing) to join the group of amazing people making this project possible: [AUTHORS.txt](./AUTHORS.txt)
Check out the [contributing wiki](https://github.com/pion/webrtc/wiki/Contributing) to join the group of amazing people making this project possible

### License
MIT License - see [LICENSE](LICENSE) for full text
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ go 1.12

require (
github.com/pion/logging v0.2.2
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.14.0
golang.org/x/sys v0.11.0
github.com/stretchr/testify v1.9.0
golang.org/x/net v0.22.0
golang.org/x/sys v0.18.0
)
22 changes: 14 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -8,23 +8,27 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -35,19 +39,21 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
4 changes: 3 additions & 1 deletion test/util_wasm.go
Original file line number Diff line number Diff line change
@@ -8,5 +8,7 @@ import (
)

func filterRoutineWASM(stack string) bool {
return strings.Contains(stack, "runtime.goexit()") // Nested t.Run on Go 1.14 WASM has this routine
// Nested t.Run on Go 1.14-1.21 and go1.22 WASM have these routines
return strings.Contains(stack, "runtime.goexit()") ||
strings.Contains(stack, "runtime.goexit({})")
}
6 changes: 3 additions & 3 deletions vnet/conn_test.go
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ func TestUDPConn(t *testing.T) {
conn.readCh <- chunk // echo back
return nil
},
onOnClosed: func(addr net.Addr) {
onOnClosed: func(net.Addr) {
atomic.AddInt32(&nClosed, 1)
},
}
@@ -143,7 +143,7 @@ func TestUDPConn(t *testing.T) {
conn.readCh <- chunk // echo back
return nil
},
onOnClosed: func(addr net.Addr) {
onOnClosed: func(net.Addr) {
atomic.AddInt32(&nClosed, 1)
},
}
@@ -204,7 +204,7 @@ func TestUDPConn(t *testing.T) {
Port: 1234,
}
obs := &dummyObserver{
onOnClosed: func(addr net.Addr) {
onOnClosed: func(net.Addr) {
atomic.AddInt32(&nClosed, 1)
},
}
2 changes: 1 addition & 1 deletion vnet/router_test.go
Original file line number Diff line number Diff line change
@@ -348,7 +348,7 @@ func TestRouterDelay(t *testing.T) {
var delayRes []time.Duration
nPkts := 1

nic[0].onInboundChunkHandler = func(c Chunk) {}
nic[0].onInboundChunkHandler = func(Chunk) {}

nic[1].onInboundChunkHandler = func(c Chunk) {
delay := time.Since(c.getTimestamp())
2 changes: 1 addition & 1 deletion vnet/udpproxy.go
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ func NewProxy(router *Router) (*UDPProxy, error) {

// Close the proxy, stop all workers.
func (v *UDPProxy) Close() error {
v.workers.Range(func(key, value interface{}) bool {
v.workers.Range(func(_, value interface{}) bool {
_ = value.(*aUDPProxyWorker).Close() //nolint:forcetypeassert
return true
})
2 changes: 1 addition & 1 deletion vnet/udpproxy_direct.go
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import (
// Deliver directly send packet to vnet or real-server.
// For example, we can use this API to simulate the REPLAY ATTACK.
func (v *UDPProxy) Deliver(sourceAddr, destAddr net.Addr, b []byte) (nn int, err error) {
v.workers.Range(func(key, value interface{}) bool {
v.workers.Range(func(_, value interface{}) bool {
if nn, err = value.(*aUDPProxyWorker).Deliver(sourceAddr, destAddr, b); err != nil {
return false // Fail, abort.
} else if nn == len(b) {
4 changes: 2 additions & 2 deletions vnet/udpproxy_direct_test.go
Original file line number Diff line number Diff line change
@@ -329,9 +329,9 @@ func TestUDPProxyDirectDeliverBadCase(t *testing.T) {
}

// BadCase: Write on closed socket, error and ignore.
proxy.workers.Range(func(key, value interface{}) bool {
proxy.workers.Range(func(_, value interface{}) bool {
//nolint:forcetypeassert
value.(*aUDPProxyWorker).endpoints.Range(func(key, value interface{}) bool {
value.(*aUDPProxyWorker).endpoints.Range(func(_, value interface{}) bool {
_ = value.(*net.UDPConn).Close() //nolint:forcetypeassert
return true
})