Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yracnet/url-proxy
Create a PROXY by URL
https://github.com/yracnet/url-proxy
Last synced: 5 days ago
JSON representation
Create a PROXY by URL
- Host: GitHub
- URL: https://github.com/yracnet/url-proxy
- Owner: yracnet
- License: mit
- Created: 2024-02-13T14:06:01.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-19T13:54:49.000Z (9 months ago)
- Last Synced: 2024-04-24T12:28:09.070Z (7 months ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# URL-Proxy Documentation
## Overview
URL-Proxy is a simple proxy server designed to forward requests to a specified target URL. The server runs on port 2000 and allows you to create proxy URLs with a specific format.
## Server Configuration
- **Port:** 2000
## Proxy URL Format
To create a proxy URL, follow the specified format:
```
http://localhost:2000/proxy/[domain]/[...url]
```- **Domain:** The target server's domain and port (e.g., my-server:8080).
- **URL:** The path to the resources on the target server, including any query parameters.## Example
Suppose the target URL is:
```
http://my-server:8080/path/to/resources?q=1
```The corresponding proxy URL would be:
```
http://localhost:2000/proxy/my-server:8080/path/to/resources?q=1
```In a simplified format:
```
http://localhost:2000/proxy/[domain=my-server:8080]/[url=path/to/resources?q=1]
```## How to Use
1. Start the URL-Proxy server on port 2000.
2. Create a proxy URL using the specified format, replacing `[domain]` and `[url]` with the appropriate values.
3. Send requests to the generated proxy URL.## Example Request
If you want to access the resources from the example above through the proxy, you would make a request to:
### Target:
```
http://jsonplaceholder.typicode.com/todos/1
```### URL Proxy
```
http://localhost:2000/proxy/jsonplaceholder.typicode.com/todos/1
```## Note
Ensure that the target server allows requests from the URL-Proxy server and that any necessary CORS (Cross-Origin Resource Sharing) configurations are in place.