websocket-sharp icon indicating copy to clipboard operation
websocket-sharp copied to clipboard

Accessible useragent name for client?

Open CornCakePie opened this issue 11 years ago • 8 comments

Could you make the user agent property accessible so we can change it at wish for what the client will send as user agent?

using (var ws = new WebSocket ("wss://example.com"))
{
    ws.UserAgent = "something I can define easily with this accessible property";
}

CornCakePie avatar Aug 20 '14 18:08 CornCakePie

For what do you change the value of User-Agent header?

sta avatar Aug 21 '14 06:08 sta

Some sockets and sites do not accept unknown user-agents for several purposes

CornCakePie avatar Aug 22 '14 21:08 CornCakePie

:+1: This is a huge issue. Especially when wanting to monitor websockets and look as inconspicious as possible. It leaves a genuine trail you may not want to.

ChangePlaces avatar Feb 23 '16 13:02 ChangePlaces

I would also like this function! Now it's impossible to pretend the request is done by a browser, which is needed sometimes.

KoalaBear84 avatar Jan 24 '17 12:01 KoalaBear84

It's too bad to make your own version and stop using NuGet for this simple change. But if that is needed..

KoalaBear84 avatar Mar 01 '17 16:03 KoalaBear84

This would be great, I need it too

LordBunny avatar May 03 '17 08:05 LordBunny

@sta

LordBunny avatar May 03 '17 08:05 LordBunny

It's a damn embarrassment that this still isn't implemented. There are endless endpoints that only accept specific user agents.

KatDevsGames avatar Oct 31 '24 20:10 KatDevsGames