mirror of
https://github.com/wso2/open-mcp-auth-proxy.git
synced 2025-06-27 17:13:31 +00:00
Merge pull request #34 from pcnfernando/main
This commit is contained in:
commit
fc0d939e16
1 changed files with 64 additions and 66 deletions
130
README.md
130
README.md
|
@ -223,102 +223,100 @@ asgardeo:
|
||||||
```
|
```
|
||||||
## Build from Source
|
## Build from Source
|
||||||
|
|
||||||
### Prerequisites for Building
|
### Prerequisites
|
||||||
|
|
||||||
* Go 1.20 or higher
|
* Go 1.20 or higher
|
||||||
* Git
|
* Git
|
||||||
* Make (for Linux/macOS builds)
|
* Make (optional, for simplified builds)
|
||||||
|
|
||||||
### Building on Linux/macOS
|
### Clone and Build
|
||||||
|
|
||||||
1. Clone the repository:
|
1. **Clone the repository:**
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/wso2/open-mcp-auth-proxy
|
git clone https://github.com/wso2/open-mcp-auth-proxy
|
||||||
cd open-mcp-auth-proxy
|
cd open-mcp-auth-proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Install dependencies:
|
2. **Install dependencies:**
|
||||||
```bash
|
```bash
|
||||||
go get -v -t -d ./...
|
go get -v -t -d ./...
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Build for your platform:
|
3. **Build the application:**
|
||||||
|
|
||||||
|
**Option A: Using Make**
|
||||||
```bash
|
```bash
|
||||||
# Build for all platforms
|
# Build for all platforms
|
||||||
make all
|
make all
|
||||||
|
|
||||||
# Or build for a specific platform
|
# Or build for specific platforms
|
||||||
make build-linux # For Linux
|
make build-linux # For Linux (x86_64)
|
||||||
make build-darwin # For macOS
|
make build-linux-arm # For ARM-based Linux
|
||||||
make build-linux-arm # For ARM-based Linux
|
make build-darwin # For macOS
|
||||||
make build-windows # For Windows
|
make build-windows # For Windows
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Find your build in the `build` directory:
|
**Option B: Manual build (works on all platforms)**
|
||||||
```bash
|
```bash
|
||||||
# For Linux
|
# Build for your current platform
|
||||||
./build/linux/openmcpauthproxy --demo
|
go build -o openmcpauthproxy ./cmd/proxy
|
||||||
|
|
||||||
# For macOS
|
# Cross-compile for other platforms
|
||||||
./build/darwin/openmcpauthproxy --demo
|
GOOS=linux GOARCH=amd64 go build -o openmcpauthproxy-linux ./cmd/proxy
|
||||||
|
GOOS=windows GOARCH=amd64 go build -o openmcpauthproxy.exe ./cmd/proxy
|
||||||
|
GOOS=darwin GOARCH=amd64 go build -o openmcpauthproxy-macos ./cmd/proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building on Windows
|
### Run the Built Application
|
||||||
|
|
||||||
1. Clone the repository:
|
After building, you'll find the executables in the `build` directory (when using Make) or in your project root (when building manually).
|
||||||
```powershell
|
|
||||||
git clone https://github.com/wso2/open-mcp-auth-proxy
|
|
||||||
cd open-mcp-auth-proxy
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Install dependencies:
|
**Linux/macOS:**
|
||||||
```powershell
|
```bash
|
||||||
go get -v -t -d ./...
|
# If built with Make
|
||||||
```
|
./build/linux/openmcpauthproxy --demo
|
||||||
|
|
||||||
3. Option 1: Build using Make if you have it installed:
|
# If built manually
|
||||||
```powershell
|
./openmcpauthproxy --demo
|
||||||
make build-windows
|
```
|
||||||
```
|
|
||||||
|
|
||||||
Option 2: Build manually without Make:
|
**Windows:**
|
||||||
```powershell
|
```powershell
|
||||||
mkdir -p build\windows
|
# If built with Make
|
||||||
go build -o build\windows\openmcpauthproxy.exe .\cmd\proxy
|
.\build\windows\openmcpauthproxy.exe --demo
|
||||||
copy config.yaml build\windows\
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Run the built application:
|
# If built manually
|
||||||
```powershell
|
.\openmcpauthproxy.exe --demo
|
||||||
cd build\windows
|
```
|
||||||
.\openmcpauthproxy.exe --demo
|
|
||||||
```
|
|
||||||
|
|
||||||
### Starting the Proxy on Windows
|
### Available Command Line Options
|
||||||
|
|
||||||
1. Open Command Prompt or PowerShell
|
```bash
|
||||||
2. Navigate to the build directory:
|
# Start in demo mode (using Asgardeo sandbox)
|
||||||
```powershell
|
./openmcpauthproxy --demo
|
||||||
cd build\windows
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Run the executable with your desired options:
|
# Start with your own Asgardeo organization
|
||||||
```powershell
|
./openmcpauthproxy --asgardeo
|
||||||
# Start in demo mode (using Asgardeo sandbox)
|
|
||||||
openmcpauthproxy.exe --demo
|
|
||||||
|
|
||||||
# Start with Asgardeo integration
|
|
||||||
openmcpauthproxy.exe --asgardeo
|
|
||||||
|
|
||||||
# Start in stdio mode
|
|
||||||
openmcpauthproxy.exe --demo --stdio
|
|
||||||
|
|
||||||
# Enable debug logging
|
|
||||||
openmcpauthproxy.exe --demo --debug
|
|
||||||
|
|
||||||
# See all available options
|
|
||||||
openmcpauthproxy.exe --help
|
|
||||||
```
|
|
||||||
|
|
||||||
4. The proxy will start and display messages indicating it's running
|
# Use stdio transport mode instead of SSE
|
||||||
5. To stop the proxy, press `Ctrl+C` in the command window
|
./openmcpauthproxy --demo --stdio
|
||||||
|
|
||||||
|
# Enable debug logging
|
||||||
|
./openmcpauthproxy --demo --debug
|
||||||
|
|
||||||
|
# Show all available options
|
||||||
|
./openmcpauthproxy --help
|
||||||
|
```
|
||||||
|
|
||||||
|
### Additional Make Targets
|
||||||
|
|
||||||
|
If you're using Make, these additional targets are available:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make test # Run tests
|
||||||
|
make coverage # Run tests with coverage report
|
||||||
|
make fmt # Format code with gofmt
|
||||||
|
make vet # Run go vet
|
||||||
|
make clean # Clean build artifacts
|
||||||
|
make help # Show all available targets
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue