Clone this repo:
  1. 3ecd4f8 Delete .test_config by Kevin Moore · 2 weeks ago master
  2. c917067 Drop an unnecessary utility (#16) by Nate Bosch · 9 weeks ago
  3. 1cb7794 Drop unused author field from pubspec (#13) by Nate Bosch · 8 months ago
  4. cb6ebf2 Merge pull request #12 from dart-lang/new-pedantic-lints by Nate Bosch · 8 months ago
  5. 9d93898 Fix newly enforced package:pedantic lints by Nate Bosch · 8 months ago

Proxy for Shelf

Build Status

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}');
}