Commit Graph

10 Commits

Author SHA1 Message Date
Dmitriy Ryajov 3e1599d790
Fix partial frame handling and allow extensions to hijack the flow (#56)
* moving files around

* wip

* wip

* move tls example into server example

* add tls functionality

* rename

* rename

* fix tests

* move extension related files to own folder

* use trace instead of debug

* export extensions

* rework partial frame handling and closing

* rework status codes as distincts

* logging

* re-enable extensions processing for frames

* enable all test for non-tls server

* remove tlsserver

* remove offset to mask - don't think we need it

* pass sessions extensions when calling send/recv

* adding encode/decode extensions flow test

* move server/client setup to helpers

* proper frame order execution on decode

* fix tls tests
2021-06-11 14:04:09 -06:00
Dmitriy Ryajov 64da1a4344
Rework http (#38)
* wip

* wip

* move http under ws folder

* use asyctest

* wip

* wip

* rework response sending

* make example work with latest changes

* wip request/response

* misc

* fix example to use new http layer

* pass tls flags to client

* more cleanup

* unused imports

* more unsused imports

* better headers

* add helpre sendError

* export sendError

* attach selected proto to session

* move proto to session

* handle unsupported version

* fix tests

* comment out for now

* fix utf8 tests

* allow tests to be ran in tls

* misc

* use Port type

* add tls flags

* better api

* run tls tests

* fix tests on windows

* allow running tests with tls

* mic

* wip

* fix autobahn ci

* handle close

* cleanup

* logging and error handling

* remove old stream
2021-05-31 20:39:14 -06:00
andri lim 723971a39d
autobahn: add test for tlsserver (#42)
also publish the result to github pages like ws server
2021-05-28 10:48:23 -06:00
jangko f3185c216f
change the python version in github action ci
from: 2.7.17 to pypy-2.7

why:
there is annoying warning message in github action ci:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020.
Please upgrade your Python as Python 2.7 won't be maintained after that date.
A future version of pip will drop support for Python 2.7.
More details about Python 2 support in pip, can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
2021-05-22 17:31:24 +07:00
jangko 888ec6f089
make autobahn start_server.sh executable
from:          ./scripts/start_server.sh
to  : chmod +x ./scripts/start_server.sh
2021-05-22 12:12:42 +07:00
Arijit Das ffeaaa9d68
Automate autobhan test suite. 2021-05-22 12:12:41 +07:00
Arijit Das 51d834a0a1
Fix webscoket close and fix test cases. 2021-05-22 12:12:31 +07:00
jangko 51ad3fd685
fix github action script
change "mingw$arch-6.3.0.7z" to "mingw$arch.7z"
2021-05-21 09:14:36 +07:00
Arijit Das 6b76bd8261
WIP: Implement websocket TLS. (#7)
* Update http to use chronos http.

* Implement TLS in websocket.

* Add webscoket TLS test.

* Minor nit.

* Add TLS test file.

* Update http to use chronos http. (#6)

* Update http to use chronos http.

* Add stream.nim file.

* Address comments.

* Fix CI failure.

* Minor change.

* Address comments.

* Fix windows CI failing test.

* minor cleanup

* spacess

* more idiomatic connect

* use stew/base10

Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>

* Implement TLS in websocket.

* Minor nit.

* merge master

* wip

* Update http to use chronos http. (#6)

* Update http to use chronos http.

* Add stream.nim file.

* Address comments.

* Fix CI failure.

* Minor change.

* Address comments.

* Fix windows CI failing test.

* minor cleanup

* spacess

* more idiomatic connect

* use stew/base10

Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>

* Update http to use chronos http.

* Implement TLS in websocket.

* Minor nit.

* Update http to use chronos http. (#6)

* Update http to use chronos http.

* Add stream.nim file.

* Address comments.

* Fix CI failure.

* Minor change.

* Address comments.

* Fix windows CI failing test.

* minor cleanup

* spacess

* more idiomatic connect

* use stew/base10

Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>

* Implement TLS in websocket.

* Minor nit.

* add testing keys

* wip

* fix test

* wip

* remove eth dep and add skipdirs

* fix package structure

* fix deps

* check nim version

* Fix CI failure.

* Don't call `ws.stream.closeWait()`

* always close both ends to complete the sequence

* misc

* don't fail on close

* Fix windows CI.

* fix linux x86 builds

* use consistent connect pattern

* move keys to better place

* return dumbResponse

* small cleanup

Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>
2021-04-13 16:05:58 -06:00
Dmitriy Ryajov 3923a9be20
Rework (#5)
* Use seq[byte] to store data.

* Working bytes conversion.

* Refactor the code.

* Add test.

* Add websocket test and fix closing handshake.

* Add MsgReader to read data in external buffer.

* rework frame reading

* don't do toTitleCase

* fix examples

* use byte for more comfort

* rework message reading + api

* fix tests

* adding specific exception types

* minor cleanup

* fixing tests

* more tests

* check the fin flag at the correct place

* info for debug

* split data not encoded frames

* more tests

* wip - control messages

* closing flow and more explicit exception handling

* test close and pings

* add tests task to nimble

* adding ci

* change recv semantics

* add frame tests

* remove echo

* better frame tests

* fix

* fix

* handle continuation frames properly

* more close logic handling

* wip tests

* handle close reasons properly

* test control frames encoding

* don't pass ws to event callbacks

* fix masking and use correct base64 encoding

* fix ci

* addressing review comments

* fix client example

* i386 ci fix

* wip ci

* fix reading offset

* don't read if socket closed

* fix ci

* wip

* don't read if socket is closed

Co-authored-by: Arijit Das <arijit@status.im>
Co-authored-by: Arijit Das <arijitad.in@gmail.com>
2021-03-18 09:30:21 -06:00