Skip to content

Commit

Permalink
1.0 release: add example, finish README.md, add LICENSE & CHANGELOG.md
Browse files Browse the repository at this point in the history
and remove tests to remove dart pub publish warnings
  • Loading branch information
sneurlax committed Apr 19, 2024
1 parent ac6d721 commit b1fa8ca
Show file tree
Hide file tree
Showing 14 changed files with 887 additions and 200 deletions.
582 changes: 582 additions & 0 deletions .idea/libraries/Dart_Packages.xml

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions .idea/libraries/Dart_SDK.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion CHANGELOG.md
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.
22 changes: 22 additions & 0 deletions LICENSE
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.
55 changes: 28 additions & 27 deletions README.md
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).
[![Pub](https://img.shields.io/pub/v/socks_socket.svg)](https://pub.dev/packages/socks_socket)
[![GitHub](https://img.shields.io/github/license/stackdump/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();
```
10 changes: 8 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# example
# socks_socket_example

A new Flutter project.
Demonstrates how to use the socks_socket package. Uses cypherstack/tor for the tor service.

## TODO

- Show how/why the other packages available are not suitable for this use case.

## Getting Started

Run as in `flutter run`.

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:
Expand Down
Loading

0 comments on commit b1fa8ca

Please sign in to comment.