11 Commits

Author SHA1 Message Date
Xiaobo Liu
50100d8c8a Remove redundant zero assignment in addr.go
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-09-04 22:20:22 -04:00
Xiaobo Liu
aa89af8123 Simplify MappedAddress IP slice initialization
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-05-28 07:58:57 +08:00
Joe Turki
0397f2187b Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-18 10:57:33 -06:00
Steffen Vogel
ab3e9f2f89 Make package REUSE compliant 2023-04-18 13:19:15 +02:00
Will LE
5600959511 Update cmd/stun-nat-behaviour (RFC5780 & RFC4787)
This update is to have cmd/stun-nat-behaviour strictly follow RFC5780
& RFC4787
- Fix typo in attributes of RFC5780
- Add RESPONSE-ORIGIN and other attributes' types in RFC5780
- Expose GetFromAs() & AddToAs() from addr.go
- Add cmd/stun-nat-behaviour parameters: timeout, verbose
- Generate new transacion id for each Binding Request
- NAT mapping tests: 2 tests -> 3 tests (add missing Test II)
- Refactor functions & update docs

Changes:
        modified:   addr.go
        modified:   attributes.go
        modified:   cmd/stun-nat-behaviour/main.go
        modified:   cmd/stun-nat-behaviour/README.md
        modified:   README.md
        modified:   testdata/stun-parameters-4.csv

Signed-off-by: Will LE <lexuandinhct@gmail.com>
2020-07-11 02:13:19 -07:00
Cecylia Bocovich
13a738c210 Add attributes for RFC 5780 (NAT behaviour)
This commit adds two attributes needed for the implementation of RFC
5780 (NAT Behavior Discovery Using STUN). The OTHER-ADDRESS attribute is
returned by a compatable STUN server and includes as its value the
server's second address. The CHANGE-REQUEST attribute is sent by a
client and contains as its value a 32-bit integer that encodes two
flags: one to indicate that the server should respond to the request
from a different IP address, and the other to request a change of port.
2020-05-27 15:43:29 -04:00
Aleksandr Razumov
24b8decf9a all: update godoc references to RFC 2018-06-29 12:03:22 +03:00
Aleksandr Razumov
d18dd21653 all: fix lint warnings 2017-02-28 00:01:20 +03:00
Aleksandr Razumov
1eef04448c fuzz: enable for setters and fix found crashers 2017-02-26 18:40:07 +03:00
Aleksandr Razumov
3d9022e65f all: clear docs, testa and Makefile (fixes #19) 2017-02-18 14:20:21 +03:00
Aleksandr Razumov
4cb0dd231a a:addr: implemented with ALTERNATE-SERVER 2017-02-12 23:25:19 +03:00