pub_proxy_server 0.1.2

  • Installing
  • Versions
  • 17


Private pub repository and proxy server.

Publish private package to your local server.

Act as proxy for or any pub server.

Private and public packages all accessible through pub command line.

pub publish --server http://me:mypassword@

pub publish --server https://me:mypassword@

pub get


Add this package to your pubspec.yaml file:

  pub_proxy_server: any

Then, run pub install to download and link in the package.

Set PUB_HOSTED_URL environent variable to http://me:mypassword@

import 'package:logging/logging.dart';
import 'package:pub_proxy_server/pub_proxy_server.dart';
import 'dart:io';

void main() {
  PermissionStore store = new PermissionStore();
  store.addPermission(new UserPermission("me", "mypassword"));
  store.addPermission(new UserPermission("", "")); //necessary to publish

  var repos = [new PubRepoImpl(new Store(new StoreSettings.fromDir("C:/Users/me/Google Drive/pub_repo","C:/Users/me/pub_repo_tmp"))), 
                 new DartLangRemoteRepo(new Store(new StoreSettings.fromRepoDirPrefix('cache')), new HttpClient())];
  PubFederatedRepo pubrepo = new PubFederatedRepo(repos);
  start_pub_proxy_server(pubrepo, port:8042, permissionStore:store, isSecure:false);
//  InitializeSSL();
//  start_pub_proxy_server(pubrepo, port:443, permissionStore:store, isSecure:true);
  Logger.root.level = Level.ALL;
  Logger.root.onRecord.listen((LogRecord rec) {
    print('${}:${rec.loggerName}: ${rec.time}: ${rec.message}');
    if (rec.error != null) print(rec.error);
    if (rec.stackTrace != null) print(rec.stackTrace);

void InitializeSSL() {
  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
  SecureSocket.initialize(database: testPkcertDatabase, password: 'a');


Web admin pages

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  pub_proxy_server: "^0.1.2"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:pub_proxy_server/pub_proxy_server.dart';
Version Uploaded Documentation Archive
0.1.2 Mar 23, 2014 Go to the documentation of pub_proxy_server 0.1.2 Download pub_proxy_server 0.1.2 archive
0.0.6 Feb 28, 2014 Go to the documentation of pub_proxy_server 0.0.6 Download pub_proxy_server 0.0.6 archive
0.0.4 Feb 27, 2014 Go to the documentation of pub_proxy_server 0.0.4 Download pub_proxy_server 0.0.4 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
57 / 100
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:pub_proxy_server/pub_proxy_server.dart with components: io.


  • Maintain

    Changelog entries help clients to follow the progress in your code.

  • Package is too old.

    The package was released more than two years ago.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 9 errors 15 hints.

    Strong-mode analysis of lib/src/federatedrepo.dart failed with the following error:

    line: 18 col: 19
    The method 'getPackageFile' isn't defined for the class 'PubRepo'.

    Strong-mode analysis of lib/src/remoterepo.dart failed with the following error:

    line: 106 col: 14
    The return type 'Future' isn't a 'FutureOr<File>', as defined by anonymous closure.

    Similar analysis of the following files failed:

    • lib/src/server.dart (error)
    • lib/pub_proxy_server.dart (hint)
    • lib/src/async.dart (hint)
    • lib/src/cache.dart (hint)
    • lib/src/io.dart (hint)
    • lib/src/permissions.dart (hint)
    • lib/src/repo.dart (hint)
    • lib/src/store.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use pub_proxy_server.dart.


Package Constraint Resolved Available
Direct dependencies
crypto 0.9.0 0.9.0 2.0.5
http_server 0.9.1 0.9.1 0.9.7
logging 0.9.1+1 0.9.1+1 0.11.3+1
path 1.0.0 1.0.0 1.6.1
route 0.4.6 0.4.6
route_hierarchical 0.4.14 0.4.14 0.7.0
yaml 0.9.0 0.9.0 2.1.14
Transitive dependencies
browser 0.10.0+3
collection 0.9.4 1.14.10
mime 0.9.6+1
Dev dependencies
unittest 0.9.3