+
Skip to content

Releases: An0n-00/ya-corps

UPDATE: ya corps v1.1.1 🥳

26 Aug 06:41
2540a71

Choose a tag to compare

What's Changed

  • UPDATE: Code cleanup and bug enhancements by @An0n-00 in #6

Full Changelog: v1.1.0...v1.1.1

UPDATE: ya corps v1.1.0 🥳

19 Aug 08:54
3356fcb

Choose a tag to compare

Added

  • You can now use GET /request with query parameters for url, method, headers, and body (no longer just via headers).
  • Improved test coverage:
    • Proxy GET/POST with valid URLs to external sites (example.com, httpbin.org).
    • Custom header support.
    • Body support for POST.
    • All error cases and pirate 404s.
  • README and OpenAPI documentation updated for GET query param usage.

Changed

  • GET /request now expects parameters in the query string (not headers).
  • Internal proxy handler refactored for clarity and reliability.

Fixed

  • CORS preflight handling remains robust.
  • Error reporting for invalid URLs and missing parameters.

Concrete References

  • fix README.md by @An0n-00 in #1
  • update dev by @An0n-00 in #2
  • feat: add custom error handling to clearly distinguish proxy-specific errors from those returned by the target API by @An0n-00 in #3
  • update docs by @An0n-00 in #4
  • Add new Features and better Documentation by @An0n-00 in #5

Full Changelog: v1.0.0...v1.1.0

RELEASE: ya corps v1.0.0 🥳

05 Aug 17:47

Choose a tag to compare

🎉 Welcome Aboard, Matey!

Ahoy there! We're thrilled to announce the inaugural release of ya-corps (Yet Another CORS Proxy Server) - your trusty vessel for navigating the treacherous waters of CORS restrictions!

🚀 What's New in v1.0.0

Core Features

CORS Proxy Server

  • Universal CORS Bypass: Proxy requests to any HTTP/HTTPS endpoint without CORS restrictions
  • Multiple HTTP Methods: Full support for GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS
  • Header Forwarding: Forward custom headers seamlessly to target APIs
  • Request Body Support: Send JSON, form data, or raw request bodies
  • Automatic Protocol Detection: Smart routing for both HTTP and HTTPS endpoints

🛡️ Security & Error Handling

  • URL Validation: Robust validation of target URLs to prevent malformed requests
  • Comprehensive Error Handling: Detailed error responses with debugging information
  • Header Filtering: Automatic filtering of problematic headers (set-cookie, etc.)
  • User-Agent Identification: Custom ya-corps user agent for request tracking

🔧 Developer Experience

  • Simple REST API: Easy-to-use POST endpoint at /request
  • Pirate-Themed Responses: Fun, memorable API responses with nautical flair
  • Comprehensive Documentation: Full OpenAPI 3.0.3 specification included
  • Environment Configuration: Flexible port configuration via .env files

API Endpoints

GET / - API Information

Returns a swashbuckling welcome message with complete API documentation and usage examples.

POST /request - CORS Proxy

The heart of ya-corps! Send any HTTP request through our proxy:

fetch('http://localhost:3000/request', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
        url: 'https://api.example.com/data',
        method: 'GET',
        headers: { 'Authorization': 'Bearer token' }
    })
})

OPTIONS * - CORS Preflight

Automatic handling of preflight requests with proper CORS headers.

GET * - Catch-All

Friendly 404 responses for undefined routes with pirate-themed messages.

📦 Technical Stack

  • Runtime: Node.js (v18+ recommended)
  • Framework: Express.js 4.x
  • CORS Handling: cors middleware + custom implementation
  • Environment: dotenv for configuration
  • Protocol Support: Built-in http/https modules

🛠️ Development Tools

Code Quality

  • ESLint: Comprehensive linting with Node.js environment support
  • Prettier: Consistent code formatting with project-specific configuration
  • Testing: Manual testing utilities with node-fetch integration

Documentation

  • OpenAPI 3.0.3: Complete API specification in openapi.yml
  • README: Comprehensive setup and usage guide
  • Issue Templates: Custom GitHub templates for bug reports and feature requests
  • PR Template: Structured pull request template for contributions

CI/CD Ready

  • GitHub Actions: Workflow configuration for automated testing
  • Environment Detection: Proper CommonJS module configuration
  • Cross-Platform: Works on Windows, macOS, and Linux

🎯 Use Cases

ya-corps is perfect for:

  • Frontend Development: Bypass CORS during development and testing
  • API Integration: Connect to third-party APIs without server-side proxying
  • Prototyping: Quick API access without complex backend setup
  • Testing: Simulate API calls from different origins
  • Educational: Learn about CORS and proxy servers

🔧 Installation & Setup

# Clone the repository
git clone https://github.com/An0n-00/ya-corps.git
cd ya-corps

# Install dependencies
npm install

# Configure environment
cp .env.example .env

# Start the server
npm run main

Server will be available at http://localhost:3000 (or your configured port).

📋 Configuration

Environment Variables

  • PORT: Server port (default: 3000)

File Structure

ya-corps/
├── index.js              # Main server file
├── package.json          # Project configuration
├── openapi.yml           # API specification
├── .env                  # Environment configuration
├── .prettierrc           # Code formatting rules
├── eslint.config.js      # Linting configuration
└── .github/              # GitHub templates and workflows

🤝 Contributing

We welcome contributions! This release includes:

  • Issue Templates: Structured bug reports and feature requests
  • PR Template: Comprehensive pull request guidelines
  • Development Setup: ESLint and Prettier configurations
  • Testing Framework: Manual testing utilities

📝 License

ya-corps is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.

🙏 Acknowledgments

Special thanks to:

  • The Express.js team for the excellent web framework
  • The Node.js community for the robust runtime environment
  • All the npm package maintainers whose work makes this possible

🐛 Known Issues

  • None reported at this time! If you encounter any issues, please report them here.

🔮 What's Next?

Stay tuned for future releases! We're considering:

  • Request/response logging capabilities
  • Rate limiting and throttling
  • Custom middleware support
  • Docker containerization
  • Additional authentication forwarding options

🏴‍☠️ Fair Winds and Following Seas!

Thank you for choosing ya-corps for your CORS proxy needs. Whether you're a seasoned developer or just starting your journey on the digital seas, we hope ya-corps serves you well in your adventures.

For support, questions, or to report issues, visit our GitHub repository.

Happy coding, and may your APIs always respond with 200 OK!

(And feel free to star us, safe travels my mate!)


ya-corps v1.0.0 - Released with ❤️ by An0n-00

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载