-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.0 release: add example, finish README.md, add LICENSE & CHANGELOG.md
and remove tests to remove dart pub publish warnings
- Loading branch information
Showing
14 changed files
with
887 additions
and
200 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## 1.0.0 | ||
|
||
- Initial version. | ||
- Dart & Flutter 3. | ||
- Supports SOCKS version 5 protocol. | ||
- SSL support. | ||
- Supports ElectrumX and Fulcrum servers via socket(s). | ||
- Async support for non-blocking network communication. | ||
- Lightweight and minimal dependencies. | ||
- Working example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 sneurlax | ||
|
||
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: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
<!-- | ||
This README describes the package. If you publish this package to pub.dev, | ||
this README's contents appear on the landing page for your package. | ||
# SOCKS sockets | ||
|
||
For information about how to write a good package README, see the guide for | ||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | ||
[](https://pub.dev/packages/socks_socket) | ||
[]( | ||
|
||
For general information about developing packages, see the Dart guide for | ||
[creating packages](https://dart.dev/guides/libraries/create-library-packages) | ||
and the Flutter guide for | ||
[developing packages and plugins](https://flutter.dev/developing-packages). | ||
--> | ||
|
||
TODO: Put a short description of the package here that helps potential users | ||
know whether this package might be useful for them. | ||
SOCKS version 5 sockets for Dart and Flutter, *eg.* ElectrumX and/or Fulcrum over Tor via socket(s). | ||
|
||
## Features | ||
|
||
TODO: List what your package can do. Maybe include images, gifs, or videos. | ||
- Dart & Flutter 3. | ||
- Support for SOCKS version 5 protocol. | ||
- Supports ElectrumX and Fulcrum servers via socket(s). | ||
- Async support for non-blocking network communication. | ||
- Lightweight and minimal dependencies. | ||
|
||
## Getting started | ||
## Getting Started | ||
|
||
TODO: List prerequisites and provide or point to information on how to | ||
start using the package. | ||
See `socks_socket.dart` itself for properties and methods and the example for reference. | ||
|
||
## Usage | ||
```dart | ||
import 'package:socks_socket/socks_socket.dart'; | ||
TODO: Include short and useful examples for package users. Add longer examples | ||
to `/example` folder. | ||
// Instantiate a socks socket at localhost and on the port selected by the tor service. | ||
var socksSocket = await SOCKSSocket.create( | ||
proxyHost: InternetAddress.loopbackIPv4.address, | ||
proxyPort: Tor.instance.port, | ||
sslEnabled: true, // For SSL connections. | ||
); | ||
```dart | ||
const like = 'sample'; | ||
``` | ||
// Connect to the socks instantiated above. | ||
await socksSocket.connect(); | ||
## Additional information | ||
// Connect to bitcoin.stackwallet.com on port 50002 via socks socket. | ||
// | ||
// Note that this is an SSL example. | ||
await socksSocket.connectTo('bitcoin.stackwallet.com', 50002); | ||
TODO: Tell users more about the package: where to find more information, how to | ||
contribute to the package, how to file issues, what response they can expect | ||
from the package authors, and more. | ||
// Send a server features command to the socket, see method for more specific usage example. | ||
await socksSocket.sendServerFeaturesCommand(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.