{"id":17982885,"url":"https://github.com/trekawek/toxiproxy-java","last_synced_at":"2025-04-09T14:12:32.000Z","repository":{"id":8301703,"uuid":"52090241","full_name":"trekawek/toxiproxy-java","owner":"trekawek","description":"Java API client for the Toxiproxy","archived":false,"fork":false,"pushed_at":"2024-03-02T14:46:38.000Z","size":169,"stargazers_count":115,"open_issues_count":8,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T12:08:16.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trekawek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-19T13:42:09.000Z","updated_at":"2024-12-30T10:44:59.000Z","dependencies_parsed_at":"2024-03-02T15:49:13.898Z","dependency_job_id":null,"html_url":"https://github.com/trekawek/toxiproxy-java","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Ftoxiproxy-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Ftoxiproxy-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Ftoxiproxy-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Ftoxiproxy-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trekawek","download_url":"https://codeload.github.com/trekawek/toxiproxy-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054195,"owners_count":21039952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T18:15:29.030Z","updated_at":"2025-04-09T14:12:31.967Z","avatar_url":"https://github.com/trekawek.png","language":"Java","funding_links":[],"categories":["容错组件"],"sub_categories":[],"readme":"# toxiproxy-java\n\n[![Build Status](https://github.com/trekawek/toxiproxy-java/workflows/CI/badge.svg)](https://github.com/trekawek/toxiproxy-java/actions?query=workflow%3ACI)\n\nThis is a client library for the [Toxiproxy](https://github.com/shopify/toxiproxy) - a proxy that simulates network and system conditions. With toxiproxy-java you may use a convenient Java API to create and manage proxies. Before you using this library, please read the [Usage section of the Toxiproxy README](https://github.com/shopify/toxiproxy#usage).\n\nInstallation:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eeu.rekawek.toxiproxy\u003c/groupId\u003e\n  \u003cartifactId\u003etoxiproxy-java\u003c/artifactId\u003e\n  \u003cversion\u003e2.1.7\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nBy default, the `ToxiproxyClient` tries to connect to the `http://localhost:8474`. This might be changed using the parametrized constructor:\n\n```java\nToxiproxyClient client = new ToxiproxyClient(\"192.168.1.1\", 8474);\n```\n\nFollowing snippet will create a new proxy for the MySQL service:\n\n```java\nProxy mysqlProxy = client.createProxy(\"mysql\", \"localhost:21212\", \"localhost:3306\");\n```\n\nThe proxy will listen on port 21212 on the loopback interface and transfer all the traffic to port 3306. We may also create a [toxic](https://github.com/shopify/toxiproxy#toxics):\n\n```java\nmysqlProxy.toxics().latency(\"my-latency-toxic\", DOWNSTREAM, 100).setJitter(15);\n```\n\nFor a full list of toxics, please visit the [Toxiproxy README](https://github.com/shopify/toxiproxy#toxics).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrekawek%2Ftoxiproxy-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrekawek%2Ftoxiproxy-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrekawek%2Ftoxiproxy-java/lists"}