mirror of
https://github.com/pion/stun.git
synced 2025-09-26 20:01:18 +08:00
Make package REUSE compliant
This commit is contained in:
4
.github/.ci.conf
vendored
4
.github/.ci.conf
vendored
@@ -1,7 +1,9 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
TEST_BENCH_OPTION=
|
TEST_BENCH_OPTION=
|
||||||
TEST_HOOK=_test_hook
|
TEST_HOOK=_test_hook
|
||||||
EXCLUDED_CONTRIBUTORS=('fossabot' 'John Bradley')
|
EXCLUDED_CONTRIBUTORS=('fossabot' 'John Bradley')
|
||||||
DISALLOWED_FUNCTIONS_EXCLUDED_DIRECTORIES="cmd example"
|
|
||||||
|
|
||||||
function _test_hook(){
|
function _test_hook(){
|
||||||
set -e
|
set -e
|
||||||
|
@@ -2,6 +2,10 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|||||||
Upstream-Name: Pion
|
Upstream-Name: Pion
|
||||||
Source: https://github.com/pion/
|
Source: https://github.com/pion/
|
||||||
|
|
||||||
Files: README.md AUTHORS.txt renovate.json
|
Files: README.md **/README.md AUTHORS.txt renovate.json go.mod go.sum
|
||||||
Copyright: 2023 The Pion community <https://pion.ly>
|
Copyright: 2023 The Pion community <https://pion.ly>
|
||||||
License: MIT
|
License: MIT
|
||||||
|
|
||||||
|
Files: testdata/fuzz/* api/*.txt
|
||||||
|
Copyright: 2023 The Pion community <https://pion.ly>
|
||||||
|
License: CC0-1.0
|
11
LICENSES/BSD-3-Clause.txt
Normal file
11
LICENSES/BSD-3-Clause.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Copyright (c) <year> <owner>.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
121
LICENSES/CC0-1.0.txt
Normal file
121
LICENSES/CC0-1.0.txt
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
Creative Commons Legal Code
|
||||||
|
|
||||||
|
CC0 1.0 Universal
|
||||||
|
|
||||||
|
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||||
|
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||||
|
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||||
|
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||||
|
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||||
|
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||||
|
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||||
|
HEREUNDER.
|
||||||
|
|
||||||
|
Statement of Purpose
|
||||||
|
|
||||||
|
The laws of most jurisdictions throughout the world automatically confer
|
||||||
|
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||||
|
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||||
|
authorship and/or a database (each, a "Work").
|
||||||
|
|
||||||
|
Certain owners wish to permanently relinquish those rights to a Work for
|
||||||
|
the purpose of contributing to a commons of creative, cultural and
|
||||||
|
scientific works ("Commons") that the public can reliably and without fear
|
||||||
|
of later claims of infringement build upon, modify, incorporate in other
|
||||||
|
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||||
|
and for any purposes, including without limitation commercial purposes.
|
||||||
|
These owners may contribute to the Commons to promote the ideal of a free
|
||||||
|
culture and the further production of creative, cultural and scientific
|
||||||
|
works, or to gain reputation or greater distribution for their Work in
|
||||||
|
part through the use and efforts of others.
|
||||||
|
|
||||||
|
For these and/or other purposes and motivations, and without any
|
||||||
|
expectation of additional consideration or compensation, the person
|
||||||
|
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||||
|
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||||
|
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||||
|
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||||
|
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||||
|
|
||||||
|
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||||
|
protected by copyright and related or neighboring rights ("Copyright and
|
||||||
|
Related Rights"). Copyright and Related Rights include, but are not
|
||||||
|
limited to, the following:
|
||||||
|
|
||||||
|
i. the right to reproduce, adapt, distribute, perform, display,
|
||||||
|
communicate, and translate a Work;
|
||||||
|
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||||
|
iii. publicity and privacy rights pertaining to a person's image or
|
||||||
|
likeness depicted in a Work;
|
||||||
|
iv. rights protecting against unfair competition in regards to a Work,
|
||||||
|
subject to the limitations in paragraph 4(a), below;
|
||||||
|
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||||
|
in a Work;
|
||||||
|
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||||
|
European Parliament and of the Council of 11 March 1996 on the legal
|
||||||
|
protection of databases, and under any national implementation
|
||||||
|
thereof, including any amended or successor version of such
|
||||||
|
directive); and
|
||||||
|
vii. other similar, equivalent or corresponding rights throughout the
|
||||||
|
world based on applicable law or treaty, and any national
|
||||||
|
implementations thereof.
|
||||||
|
|
||||||
|
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||||
|
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||||
|
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||||
|
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||||
|
of action, whether now known or unknown (including existing as well as
|
||||||
|
future claims and causes of action), in the Work (i) in all territories
|
||||||
|
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||||
|
treaty (including future time extensions), (iii) in any current or future
|
||||||
|
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||||
|
including without limitation commercial, advertising or promotional
|
||||||
|
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||||
|
member of the public at large and to the detriment of Affirmer's heirs and
|
||||||
|
successors, fully intending that such Waiver shall not be subject to
|
||||||
|
revocation, rescission, cancellation, termination, or any other legal or
|
||||||
|
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||||
|
as contemplated by Affirmer's express Statement of Purpose.
|
||||||
|
|
||||||
|
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||||
|
be judged legally invalid or ineffective under applicable law, then the
|
||||||
|
Waiver shall be preserved to the maximum extent permitted taking into
|
||||||
|
account Affirmer's express Statement of Purpose. In addition, to the
|
||||||
|
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||||
|
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||||
|
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||||
|
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||||
|
maximum duration provided by applicable law or treaty (including future
|
||||||
|
time extensions), (iii) in any current or future medium and for any number
|
||||||
|
of copies, and (iv) for any purpose whatsoever, including without
|
||||||
|
limitation commercial, advertising or promotional purposes (the
|
||||||
|
"License"). The License shall be deemed effective as of the date CC0 was
|
||||||
|
applied by Affirmer to the Work. Should any part of the License for any
|
||||||
|
reason be judged legally invalid or ineffective under applicable law, such
|
||||||
|
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||||
|
of the License, and in such case Affirmer hereby affirms that he or she
|
||||||
|
will not (i) exercise any of his or her remaining Copyright and Related
|
||||||
|
Rights in the Work or (ii) assert any associated claims and causes of
|
||||||
|
action with respect to the Work, in either case contrary to Affirmer's
|
||||||
|
express Statement of Purpose.
|
||||||
|
|
||||||
|
4. Limitations and Disclaimers.
|
||||||
|
|
||||||
|
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||||
|
surrendered, licensed or otherwise affected by this document.
|
||||||
|
b. Affirmer offers the Work as-is and makes no representations or
|
||||||
|
warranties of any kind concerning the Work, express, implied,
|
||||||
|
statutory or otherwise, including without limitation warranties of
|
||||||
|
title, merchantability, fitness for a particular purpose, non
|
||||||
|
infringement, or the absence of latent or other defects, accuracy, or
|
||||||
|
the present or absence of errors, whether or not discoverable, all to
|
||||||
|
the greatest extent permissible under applicable law.
|
||||||
|
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||||
|
that may apply to the Work or any use thereof, including without
|
||||||
|
limitation any person's Copyright and Related Rights in the Work.
|
||||||
|
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||||
|
consents, permissions or other rights required for any use of the
|
||||||
|
Work.
|
||||||
|
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||||
|
party to this document and has no duty or obligation with respect to
|
||||||
|
this CC0 or use of the Work.
|
@@ -1,4 +1,6 @@
|
|||||||
Copyright 2018 Pion LLC
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) <year> <copyright holders>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
3
Makefile
3
Makefile
@@ -1,3 +1,6 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
VERSION := $(shell git describe --tags | sed -e 's/^v//g' | awk -F "-" '{print $$1}')
|
VERSION := $(shell git describe --tags | sed -e 's/^v//g' | awk -F "-" '{print $$1}')
|
||||||
ITERATION := $(shell git describe --tags --long | awk -F "-" '{print $$2}')
|
ITERATION := $(shell git describe --tags --long | awk -F "-" '{print $$2}')
|
||||||
GO_VERSION=$(shell gobuild -v)
|
GO_VERSION=$(shell gobuild -v)
|
||||||
|
3
addr.go
3
addr.go
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
3
agent.go
3
agent.go
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,2 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
api -c $(ls -dm stun*.txt | tr -d ' \n') -except except.txt github.com/pion/stun
|
api -c $(ls -dm stun*.txt | tr -d ' \n') -except except.txt github.com/pion/stun
|
||||||
|
22
appveyor.yml
22
appveyor.yml
@@ -1,22 +0,0 @@
|
|||||||
version: "{build}"
|
|
||||||
|
|
||||||
platform: x64
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
skip_tags: true
|
|
||||||
|
|
||||||
clone_folder: c:\gopath\src\github.com\pion\stun
|
|
||||||
|
|
||||||
environment:
|
|
||||||
GOPATH: c:\gopath
|
|
||||||
GOVERSION: 1.12
|
|
||||||
|
|
||||||
install:
|
|
||||||
- go version
|
|
||||||
- go get -v -t .
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- go test -v .
|
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build debug
|
//go:build debug
|
||||||
// +build debug
|
// +build debug
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build debug
|
//go:build debug
|
||||||
// +build debug
|
// +build debug
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !debug
|
//go:build !debug
|
||||||
// +build !debug
|
// +build !debug
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build debug
|
//go:build debug
|
||||||
// +build debug
|
// +build debug
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package main implements benchmarks for the STUN package
|
// Package main implements benchmarks for the STUN package
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package main implements a CLI tool which acts as a STUN client
|
// Package main implements a CLI tool which acts as a STUN client
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package main implements a simple CLI tool to decode STUN messages
|
// Package main implements a simple CLI tool to decode STUN messages
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Command stun-multiplex is example of doing UDP connection multiplexing
|
// Command stun-multiplex is example of doing UDP connection multiplexing
|
||||||
// that splits incoming UDP packets to two streams, "STUN Data" and
|
// that splits incoming UDP packets to two streams, "STUN Data" and
|
||||||
// "Application Data".
|
// "Application Data".
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
// This cmd implements RFC5780's tests:
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// This package implements RFC5780's tests:
|
||||||
// - 4.3. Determining NAT Mapping Behavior
|
// - 4.3. Determining NAT Mapping Behavior
|
||||||
// - 4.4. Determining NAT Filtering Behavior
|
// - 4.4. Determining NAT Filtering Behavior
|
||||||
package main
|
package main
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package main implements a simple CLI tools to perform NAT traversal via STUN
|
// Package main implements a simple CLI tools to perform NAT traversal via STUN
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
@@ -1,4 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
echo "net: $INTERFACE $SUBNET"
|
echo "net: $INTERFACE $SUBNET"
|
||||||
tcpdump -U -v -i $INTERFACE \
|
tcpdump -U -v -i $INTERFACE \
|
||||||
src net $SUBNET and dst net $SUBNET \
|
src net $SUBNET and dst net $SUBNET \
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
ARG CI_GO_VERSION
|
ARG CI_GO_VERSION
|
||||||
FROM golang:${CI_GO_VERSION}
|
FROM golang:${CI_GO_VERSION}
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package main implement end-to-end tests
|
// Package main implement end-to-end tests
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
FROM ubuntu
|
FROM ubuntu
|
||||||
RUN apt-get update && apt-get install -y tcpdump
|
RUN apt-get update && apt-get install -y tcpdump
|
||||||
RUN apt-get install net-tools -y
|
RUN apt-get install net-tools -y
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
export CURRENT_GO_VERSION=$(echo -n "$(go version)" | grep -o 'go1\.[0-9|\.]*' || true)
|
export CURRENT_GO_VERSION=$(echo -n "$(go version)" | grep -o 'go1\.[0-9|\.]*' || true)
|
||||||
CURRENT_GO_VERSION=${CURRENT_GO_VERSION#go}
|
CURRENT_GO_VERSION=${CURRENT_GO_VERSION#go}
|
||||||
GO_VERSION=${GO_VERSION:-$CURRENT_GO_VERSION}
|
GO_VERSION=${GO_VERSION:-$CURRENT_GO_VERSION}
|
||||||
|
@@ -1,200 +1,21 @@
|
|||||||
# Coturn TURN SERVER configuration file
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
Verbose
|
Verbose
|
||||||
fingerprint
|
fingerprint
|
||||||
|
|
||||||
# Uncomment to use long-term credential mechanism.
|
log-file=stdout
|
||||||
# By default no credentials mechanism is used (any user allowed).
|
|
||||||
#
|
|
||||||
lt-cred-mech
|
lt-cred-mech
|
||||||
|
|
||||||
# This option is opposite to lt-cred-mech.
|
|
||||||
# (TURN Server with no-auth option allows anonymous access).
|
|
||||||
# If neither option is defined, and no users are defined,
|
|
||||||
# then no-auth is default. If at least one user is defined,
|
|
||||||
# in this file or in command line or in usersdb file, then
|
|
||||||
# lt-cred-mech is default.
|
|
||||||
#
|
|
||||||
#no-auth
|
|
||||||
|
|
||||||
# 'Static' user accounts for long term credentials mechanism, only.
|
|
||||||
# This option cannot be used with TURN REST API.
|
|
||||||
# 'Static' user accounts are NOT dynamically checked by the turnserver process,
|
|
||||||
# so that they can NOT be changed while the turnserver is running.
|
|
||||||
#
|
|
||||||
#user=username1:key1
|
|
||||||
#user=username2:key2
|
|
||||||
# OR:
|
|
||||||
#user=username1:password1
|
|
||||||
#user=username2:password2
|
|
||||||
#
|
|
||||||
# Keys must be generated by turnadmin utility. The key value depends
|
|
||||||
# on user name, realm, and password:
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# $ turnadmin -k -u ninefingers -r north.gov -p youhavetoberealistic
|
|
||||||
# Output: 0xbc807ee29df3c9ffa736523fb2c4e8ee
|
|
||||||
# ('0x' in the beginning of the key is what differentiates the key from
|
|
||||||
# password. If it has 0x then it is a key, otherwise it is a password).
|
|
||||||
#
|
|
||||||
# The corresponding user account entry in the config file will be:
|
|
||||||
#
|
|
||||||
#user=ninefingers:0xbc807ee29df3c9ffa736523fb2c4e8ee
|
|
||||||
# Or, equivalently, with open clear password (less secure):
|
|
||||||
#user=ninefingers:youhavetoberealistic
|
|
||||||
#
|
|
||||||
|
|
||||||
user=user:secret
|
user=user:secret
|
||||||
realm=realm
|
realm=realm
|
||||||
|
|
||||||
# Uncomment if no UDP client listener is desired.
|
no-cli
|
||||||
# By default UDP client listener is always started.
|
|
||||||
#
|
|
||||||
#no-udp
|
|
||||||
|
|
||||||
# Uncomment if no TCP client listener is desired.
|
|
||||||
# By default TCP client listener is always started.
|
|
||||||
#
|
|
||||||
# no-tcp
|
|
||||||
|
|
||||||
# Uncomment if no TLS client listener is desired.
|
|
||||||
# By default TLS client listener is always started.
|
|
||||||
#
|
|
||||||
no-tls
|
no-tls
|
||||||
|
|
||||||
# Uncomment if no DTLS client listener is desired.
|
|
||||||
# By default DTLS client listener is always started.
|
|
||||||
#
|
|
||||||
no-dtls
|
no-dtls
|
||||||
|
|
||||||
# Uncomment if no UDP relay endpoints are allowed.
|
|
||||||
# By default UDP relay endpoints are enabled (like in RFC 5766).
|
|
||||||
#
|
|
||||||
#no-udp-relay
|
|
||||||
|
|
||||||
# Uncomment if no TCP relay endpoints are allowed.
|
|
||||||
# By default TCP relay endpoints are enabled (like in RFC 6062).
|
|
||||||
#
|
|
||||||
no-tcp-relay
|
no-tcp-relay
|
||||||
|
|
||||||
# Uncomment if extra security is desired,
|
|
||||||
# with nonce value having limited lifetime (600 secs).
|
|
||||||
# By default, the nonce value is unique for a session,
|
|
||||||
# but it has unlimited lifetime. With this option,
|
|
||||||
# the nonce lifetime is limited to 600 seconds, after that
|
|
||||||
# the client will get 438 error and will have to re-authenticate itself.
|
|
||||||
#
|
|
||||||
stale-nonce
|
|
||||||
|
|
||||||
# Certificate file.
|
|
||||||
# Use an absolute path or path relative to the
|
|
||||||
# configuration file.
|
|
||||||
#
|
|
||||||
#cert=/usr/local/etc/turn_server_cert.pem
|
|
||||||
|
|
||||||
# Private key file.
|
|
||||||
# Use an absolute path or path relative to the
|
|
||||||
# configuration file.
|
|
||||||
# Use PEM file format.
|
|
||||||
#
|
|
||||||
#pkey=/usr/local/etc/turn_server_pkey.pem
|
|
||||||
|
|
||||||
# Private key file password, if it is in encoded format.
|
|
||||||
# This option has no default value.
|
|
||||||
#
|
|
||||||
#pkey-pwd=...
|
|
||||||
|
|
||||||
# Allowed OpenSSL cipher list for TLS/DTLS connections.
|
|
||||||
# Default value is "DEFAULT".
|
|
||||||
#
|
|
||||||
#cipher-list="DEFAULT"
|
|
||||||
|
|
||||||
# CA file in OpenSSL format.
|
|
||||||
# Forces TURN server to verify the client SSL certificates.
|
|
||||||
# By default it is not set: there is no default value and the client
|
|
||||||
# certificate is not checked.
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
#CA-file=/etc/ssh/id_rsa.cert
|
|
||||||
|
|
||||||
# Curve name for EC ciphers, if supported by OpenSSL
|
|
||||||
# library (TLS and DTLS). The default value is prime256v1,
|
|
||||||
# if pre-OpenSSL 1.0.2 is used. With OpenSSL 1.0.2+,
|
|
||||||
# an optimal curve will be automatically calculated, if not defined
|
|
||||||
# by this option.
|
|
||||||
#
|
|
||||||
#ec-curve-name=prime256v1
|
|
||||||
|
|
||||||
# Use 566 bits predefined DH TLS key. Default size of the key is 1066.
|
|
||||||
#
|
|
||||||
#dh566
|
|
||||||
|
|
||||||
# Use 2066 bits predefined DH TLS key. Default size of the key is 1066.
|
|
||||||
#
|
|
||||||
#dh2066
|
|
||||||
|
|
||||||
# Use custom DH TLS key, stored in PEM format in the file.
|
|
||||||
# Flags --dh566 and --dh2066 are ignored when the DH key is taken from a file.
|
|
||||||
#
|
|
||||||
#dh-file=<DH-PEM-file-name>
|
|
||||||
|
|
||||||
# Flag to prevent stdout log messages.
|
|
||||||
# By default, all log messages are going to both stdout and to
|
|
||||||
# the configured log file. With this option everything will be
|
|
||||||
# going to the configured log only (unless the log file itself is stdout).
|
|
||||||
#
|
|
||||||
#no-stdout-log
|
|
||||||
|
|
||||||
# Option to set the log file name.
|
|
||||||
# By default, the turnserver tries to open a log file in
|
|
||||||
# /var/log, /var/tmp, /tmp and current directories directories
|
|
||||||
# (which open operation succeeds first that file will be used).
|
|
||||||
# With this option you can set the definite log file name.
|
|
||||||
# The special names are "stdout" and "-" - they will force everything
|
|
||||||
# to the stdout. Also, the "syslog" name will force everything to
|
|
||||||
# the system log (syslog).
|
|
||||||
# In the runtime, the logfile can be reset with the SIGHUP signal
|
|
||||||
# to the turnserver process.
|
|
||||||
#
|
|
||||||
log-file=stdout
|
|
||||||
|
|
||||||
# Option to redirect all log output into system log (syslog).
|
|
||||||
#
|
|
||||||
#syslog
|
|
||||||
|
|
||||||
# Option to suppress TURN functionality, only STUN requests will be processed.
|
|
||||||
# Run as STUN server only, all TURN requests will be ignored.
|
|
||||||
# By default, this option is NOT set.
|
|
||||||
#
|
|
||||||
stun-only
|
stun-only
|
||||||
|
|
||||||
# Option to suppress STUN functionality, only TURN requests will be processed.
|
|
||||||
# Run as TURN server only, all STUN requests will be ignored.
|
|
||||||
# By default, this option is NOT set.
|
|
||||||
#
|
|
||||||
#no-stun
|
|
||||||
|
|
||||||
# Require authentication of the STUN Binding request.
|
|
||||||
# By default, the clients are allowed anonymous access to the STUN Binding functionality.
|
|
||||||
#
|
|
||||||
secure-stun
|
secure-stun
|
||||||
|
|
||||||
# Mobility with ICE (MICE) specs support.
|
stale-nonce
|
||||||
#
|
|
||||||
#mobility
|
|
||||||
|
|
||||||
# User name to run the process. After the initialization, the turnserver process
|
|
||||||
# will make an attempt to change the current user ID to that user.
|
|
||||||
#
|
|
||||||
#proc-user=<user-name>
|
|
||||||
|
|
||||||
# Group name to run the process. After the initialization, the turnserver process
|
|
||||||
# will make an attempt to change the current group ID to that group.
|
|
||||||
#
|
|
||||||
#proc-group=<group-name>
|
|
||||||
|
|
||||||
# Turn OFF the CLI support.
|
|
||||||
# By default it is always ON.
|
|
||||||
# See also options cli-ip and cli-port.
|
|
||||||
#
|
|
||||||
no-cli
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import "errors"
|
import "errors"
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build debug
|
//go:build debug
|
||||||
// +build debug
|
// +build debug
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
21
go.test.sh
21
go.test.sh
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
touch coverage.txt
|
|
||||||
|
|
||||||
# quick-test without -race
|
|
||||||
go test ./...
|
|
||||||
|
|
||||||
# test with "debug" tag
|
|
||||||
go test -tags debug ./...
|
|
||||||
|
|
||||||
# test concurrency
|
|
||||||
go test -race -cpu=1,2,4 -run TestClient_DoConcurrent
|
|
||||||
|
|
||||||
for d in $(go list ./... | grep -v vendor); do
|
|
||||||
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
|
||||||
if [[ -f profile.out ]]; then
|
|
||||||
cat profile.out >> coverage.txt
|
|
||||||
rm profile.out
|
|
||||||
fi
|
|
||||||
done
|
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
// Interfaces that are implemented by message attributes, shorthands for them,
|
// Interfaces that are implemented by message attributes, shorthands for them,
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
@@ -15,6 +18,7 @@ func loadCSV(t testing.TB, name string) [][]string {
|
|||||||
t.Helper()
|
t.Helper()
|
||||||
data := loadData(t, name)
|
data := loadData(t, name)
|
||||||
r := csv.NewReader(bytes.NewReader(data))
|
r := csv.NewReader(bytes.NewReader(data))
|
||||||
|
r.Comment = '#'
|
||||||
records, err := r.ReadAll()
|
records, err := r.ReadAll()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import ( //nolint:gci
|
import ( //nolint:gci
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build debug
|
//go:build debug
|
||||||
// +build debug
|
// +build debug
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
// Copyright 2009 The Go Authors. All rights reserved.
|
// SPDX-FileCopyrightText: 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package hmac implements the Keyed-Hash Message Authentication Code (HMAC) as
|
Package hmac implements the Keyed-Hash Message Authentication Code (HMAC) as
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
// Copyright 2009 The Go Authors. All rights reserved.
|
// SPDX-FileCopyrightText: 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
package hmac
|
package hmac
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package hmac
|
package hmac
|
||||||
|
|
||||||
import ( //nolint:gci
|
import ( //nolint:gci
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package hmac
|
package hmac
|
||||||
|
|
||||||
import ( //nolint:gci
|
import ( //nolint:gci
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/env bash
|
||||||
|
|
||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
cp -v $GOROOT/src/crypto/hmac/{hmac,hmac_test}.go .
|
cp -v $GOROOT/src/crypto/hmac/{hmac,hmac_test}.go .
|
||||||
git diff {hmac,hmac_test}.go
|
git diff {hmac,hmac_test}.go
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package testutil contains helpers and utilities for writing tests
|
// Package testutil contains helpers and utilities for writing tests
|
||||||
package testutil
|
package testutil
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !race
|
//go:build !race
|
||||||
// +build !race
|
// +build !race
|
||||||
|
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
//go:build race
|
||||||
// +build race
|
// +build race
|
||||||
|
|
||||||
package testutil
|
package testutil
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
@@ -574,7 +577,7 @@ func TestExampleChrome(t *testing.T) {
|
|||||||
func TestMessageFromBrowsers(t *testing.T) {
|
func TestMessageFromBrowsers(t *testing.T) {
|
||||||
// file contains udp-packets captured from browsers (WebRTC)
|
// file contains udp-packets captured from browsers (WebRTC)
|
||||||
reader := csv.NewReader(bytes.NewReader(loadData(t, "frombrowsers.csv")))
|
reader := csv.NewReader(bytes.NewReader(loadData(t, "frombrowsers.csv")))
|
||||||
reader.Comma = ','
|
reader.Comment = '#'
|
||||||
_, err := reader.Read() // skipping header
|
_, err := reader.Read() // skipping header
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("failed to skip header of csv: ", err)
|
t.Fatal("failed to skip header of csv: ", err)
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
3
stun.go
3
stun.go
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package stun implements Session Traversal Utilities for NAT (STUN) RFC 5389.
|
// Package stun implements Session Traversal Utilities for NAT (STUN) RFC 5389.
|
||||||
//
|
//
|
||||||
// The stun package is intended to use by package that implements extension
|
// The stun package is intended to use by package that implements extension
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
// Package stuntest contains helpers for testing STUN clients
|
// Package stuntest contains helpers for testing STUN clients
|
||||||
package stuntest
|
package stuntest
|
||||||
|
|
||||||
|
2
testdata/ex1_chrome.stun.license
vendored
Normal file
2
testdata/ex1_chrome.stun.license
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
SPDX-License-Identifier: CC0-1.0
|
2
testdata/frombrowsers.csv
vendored
2
testdata/frombrowsers.csv
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
ip,message,crc,browser,version,system
|
ip,message,crc,browser,version,system
|
||||||
213.87.135.35:5127,AAEAACESpEJaU3lNekUycUIveEc=,14955568470663943731,Chrome,55.0.2883.91,Android 5.1.1
|
213.87.135.35:5127,AAEAACESpEJaU3lNekUycUIveEc=,14955568470663943731,Chrome,55.0.2883.91,Android 5.1.1
|
||||||
213.87.135.35:35359,AAEACCESpEL/qLJHuDKc5PsGghOAKAAEqgN+GQ==,10276095995276579762,Firefox,50.0,Mobile
|
213.87.135.35:35359,AAEACCESpEL/qLJHuDKc5PsGghOAKAAEqgN+GQ==,10276095995276579762,Firefox,50.0,Mobile
|
||||||
|
|
2
testdata/stun-parameters-2.csv
vendored
2
testdata/stun-parameters-2.csv
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
Value,Name,Reference
|
Value,Name,Reference
|
||||||
0x000,Reserved,[RFC5389]
|
0x000,Reserved,[RFC5389]
|
||||||
0x001,Binding,[RFC5389]
|
0x001,Binding,[RFC5389]
|
||||||
|
Can't render this file because it has a wrong number of fields in line 3.
|
2
testdata/stun-parameters-4.csv
vendored
2
testdata/stun-parameters-4.csv
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
Value,Name,Reference
|
Value,Name,Reference
|
||||||
0x0000,Reserved,[RFC8489]
|
0x0000,Reserved,[RFC8489]
|
||||||
0x0001,MAPPED-ADDRESS,[RFC8489]
|
0x0001,MAPPED-ADDRESS,[RFC8489]
|
||||||
|
|
2
testdata/stun-parameters-6.csv
vendored
2
testdata/stun-parameters-6.csv
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
Value,Name,Reference
|
Value,Name,Reference
|
||||||
0-299,Reserved,
|
0-299,Reserved,
|
||||||
300,Try Alternate,[RFC5389]
|
300,Try Alternate,[RFC5389]
|
||||||
|
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
// NewUsername returns Username with provided value.
|
// NewUsername returns Username with provided value.
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import "errors"
|
import "errors"
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
3
uri.go
3
uri.go
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import "testing"
|
import "testing"
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package stun
|
package stun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//go:build !js
|
//go:build !js
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user