Viewing version 1.0.5. Open the latest package page.

shelf_proxy

1.0.5

A shelf handler for proxying HTTP requests to another server.

Download archive

Readme

pub package package publisher

Proxy for Shelf

shelf_proxy is a Shelf handler that proxies requests to an external server. It can be served directly and used as a proxy server, or it can be mounted within a larger application to proxy only certain URLs.

import 'package:shelf/shelf_io.dart' as shelf_io;
import 'package:shelf_proxy/shelf_proxy.dart';

void main() async {
  var server = await shelf_io.serve(
    proxyHandler("https://dart.dev"),
    'localhost',
    8080,
  );

  print('Proxying at http://${server.address.host}:${server.port}');
}
Changelog

1.0.5

  • Correctly handle multiple Cookie headers in requests and Set-Cookie headers in responses.
  • Require package:http ^1.2.0.
  • Require Dart ^3.3.0.

1.0.4

  • Require Dart 2.19.
  • Allow package:http v1.0.0

1.0.3

  • Added package topics to the pubspec file.
  • Require Dart 2.17.

1.0.2

  • Update the pubspec repository field.

1.0.1

  • Drop dependency on package:pedantic.
  • Require Dart 2.14.

1.0.0

  • Require Dart 2.12.
  • Enable null safety.
  • Removed deprecated createProxyHandler.

0.1.0+7

  • Added example.
  • Fixed links in README.

0.1.0+6

  • Support the latest version of package:http.

0.1.0+5

  • Support Dart 2.

0.1.0+4

  • Internal changes only.

0.1.0+3

  • Support version 0.7.0 of shelf.

0.1.0+2

  • Support version 0.6.0 of shelf.

0.1.0+1

  • Added drone.io badge to README.md.

0.1.0

  • createProxyHandler (new deprecated) is replaced with proxyHandler.

  • Updated to be compatible with RFC 2616 Proxy specification.

0.0.2

  • Updated README.md and doc comments on createProxyHandler.

  • Added an example.

0.0.1

  • First release.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'shelf_proxy:1.0.5'
pubspec.yaml
name: shelf_proxy
version: 1.0.5
description: A shelf handler for proxying HTTP requests to another server.
repository: https://github.com/dart-lang/shelf/tree/master/pkgs/shelf_proxy
issue_tracker: https://github.com/dart-lang/shelf/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Ashelf_proxy

topics:
  - server
  - shelf

environment:
  sdk: ^3.3.0

dependencies:
  http: ^1.2.0
  path: ^1.8.0
  shelf: ^1.0.0

dev_dependencies:
  dart_flutter_team_lints: ^3.0.0
  test: ^1.6.0

Version history

VersionPublishedArchiveSHA-256
0.0.1On demandDownloadf1e08132…1d71db
0.0.2On demandDownload69ca4371…f320ef
0.1.0On demandDownloadec271bac…afb0a3
0.1.0+1On demandDownloadc1e15d94…3c6120
0.1.0+2On demandDownload228dab3a…857204
0.1.0+3On demandDownload554a03af…0387ec
0.1.0+4On demandDownloadbd42cdb5…31a36e
0.1.0+5On demandDownloadb245e6e9…307e54
0.1.0+6On demandDownloadf1289beb…381e01
0.1.0+7On demandDownload814287fc…259ac1
1.0.0On demandDownload50012344…526b85
1.0.1On demandDownload14d1fd8e…b9b540
1.0.2On demandDownload3cdbff72…f574b8
1.0.3On demandDownloadcf9883f9…732abe
1.0.4On demandDownloada71d2307…6a7ee3
1.0.5Cached · Upstream SHA-256 matchedDownload0c3a7b2b…3aa10b

Dependencies

http "^1.2.0"

path "^1.8.0"

shelf "^1.0.0"