Clone this repo:
  1. 124615d Drop pkg:pedantic, prepare for v1.0.1 (#24) by Kevin Moore · 4 months ago master v1.0.1
  2. b118f76 Update LICENSE by Franklin Yow · 10 months ago
  3. 06fde34 Update LICENSE by Franklin Yow · 10 months ago
  4. ccd311f enable null safety (#23) by Kevin Moore · 10 months ago v1.0.0
  5. 8dee6ed Migrate to GitHub Actions (#21) by Alexander Thomas · 12 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}');
}