NO

Author Topic: Session Traversal Utilities for NAT (STUN) - Client  (Read 1604 times)

Offline WiiLF23

  • Member
  • *
  • Posts: 89
Session Traversal Utilities for NAT (STUN) - Client
« on: November 02, 2024, 03:05:52 AM »
Just something I pieced together, converted main functions from C++ -> C, and implemented a GUI. I needed a easy testing client for NAT traversal work. This just made sense.

For those who would like to use it.

x64

Credits to https://gist.github.com/jyaif/

----

Updated:
- Added NAT type
- Added local and public endpoint address fields
- Added XOR MAPPED ADDRESS attribute feedback

Updated - 1.0.5
- Updated resource file to contain file metadata
- Updated UI functions to respect Unicode
- Fixed incorrect window class name
- Handle EN_CHANGE event to automatically parse and send request to pasted server address
- Added icon on dialog to indicate connection states

Updated - 1.0.7
- Updated Edit controls for responsiveness
- Addressed memory leak on close
- Added field check on server and numeric/range check on port
« Last Edit: November 04, 2024, 06:38:26 AM by WiiLF23 »

Offline Vortex

  • Member
  • *
  • Posts: 864
    • http://www.vortex.masmcode.com
Re: Session Traversal Utilities for NAT (STUN) - Client
« Reply #1 on: November 02, 2024, 09:58:04 AM »
Hello WiiLF23,

The project is built with some warning messages :

Code: [Select]
Building main.obj.
E:\PellesC\Include\Win\ws2tcpip.h(360): warning #2215: Conversion from 'unsigned long long int' to 'unsigned long int'; possible loss of data or unexpected result.
E:\PellesC\Include\Win\ws2tcpip.h(396): warning #2215: Conversion from 'unsigned long long int' to 'unsigned long int'; possible loss of data or unexpected result.
E:\PellesC\Include\Win\ws2tcpip.h(438): warning #2215: Conversion from 'unsigned long long int' to 'unsigned long int'; possible loss of data or unexpected result.
E:\PellesC\Include\Win\ws2tcpip.h(475): warning #2215: Conversion from 'unsigned long long int' to 'unsigned long int'; possible loss of data or unexpected result.
Building main.res.
Building STUN Client.exe.
Done.

Compiler : Pelles C V12
Code it... That's all...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Session Traversal Utilities for NAT (STUN) - Client
« Reply #2 on: November 02, 2024, 10:58:38 AM »
it's just size_t / sizeof issue in C macro ?
struct size is less than DWORD max.
« Last Edit: November 03, 2024, 02:25:30 PM by TimoVJL »
May the source be with you