Firefox Sync
CREATE DATABASE syncstorage_rs; CREATE DATABASE tokenserver_rs; GRANT ALL PRIVILEGES on syncstorage_rs.* to ffsync@localhost; GRANT ALL PRIVILEGES on tokenserver_rs.* to ffsync@localhost;
config/local.toml anlegen:
master_secret = "OUOOI6VTANRJNCTX73FNBOKZH5WPXX4RO5R7D2VD3OOAEP2IKDWSHAMP6VSPKVTY" # removing this line will default to moz_json formatted logs (which is preferred for production envs) human_logs = 1 # Example Syncstorage settings: # Example MySQL DSN: syncstorage.database_url = "mysql://ffsync:ffsync@localhost/syncstorage_rs" # Example Spanner DSN: # database_url="spanner://projects/SAMPLE_GCP_PROJECT/instances/SAMPLE_SPANNER_INSTANCE/databases/SAMPLE_SPANNER_DB" # enable quota limits syncstorage.enable_quota = 0 # set the quota limit to 2GB. # max_quota_limit = 200000000 syncstorage.enabled = true syncstorage.limits.max_total_records = 1666 # See issues #298/#333 # Example Tokenserver settings: tokenserver.database_url = "mysql://ffsync:ffsync@localhost/tokenserver_rs" tokenserver.enabled = true #tokenserver.fxa_email_domain = "api-accounts.stage.mozaws.net" #tokenserver.fxa_metrics_hash_secret = "12345678" #tokenserver.fxa_oauth_server_url = "https://oauth.stage.mozaws.net" #tokenserver.fxa_browserid_audience = "https://token.stage.mozaws.net" #tokenserver.fxa_browserid_issuer = "https://api-accounts.stage.mozaws.net" #tokenserver.fxa_browserid_server_url = "https://verifier.stage.mozaws.net/v2" tokenserver.fxa_email_domain = "api.accounts.firefox.com" tokenserver.fxa_metrics_hash_secret = "R7EHBV5PUMR36ZCM34PWMDNCT5MZNCTB75H6JR7GEP4EASGUJHFY2YYDDO5XTEPC" tokenserver.fxa_oauth_server_url = "https://oauth.accounts.firefox.com" tokenserver.fxa_browserid_audience = "https://token.services.mozilla.com" tokenserver.fxa_browserid_issuer = "https://api.accounts.firefox.com" tokenserver.fxa_browserid_server_url = "https://verifier.accounts.firefox.com/v2" tokenserver.run_migrations = true # cors settings # cors_allowed_origin = "localhost" # cors_max_age = 86400
Virtual Environment für Python erstellen:
python3 -m venv py-ffsync-rust py-ffsync-rust/bin/python -m pip install -r requirements.txt
Ins Virtual Environment gehen:
. py-ffsync-rust/bin/activate
Starten:
cargo run --no-default-features --features=syncstorage-db/mysql -- --config config/local.toml
USE tokenserver_rs;
INSERT IGNORE INTO services (id, service, pattern) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}');
INSERT INTO nodes (id, service, node, available, current_load, capacity, downed, backoff) VALUES ('1', '1', 'https://ffsync.darkrealm.dyndns.org', '1', '0', '25', '0', '0');
Alte Sync-URL: https://ffsync.darkrealm.dyndns.org/token/1.0/sync/1.5
Neue Sync-URL: https://ffsync.darkrealm.dyndns.org/1.0/sync/1.5