This commit is contained in:
		
							parent
							
								
									ffb19f42c4
								
							
						
					
					
						commit
						f890970f84
					
				
							
								
								
									
										46
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,46 @@
 | 
			
		||||
# TCP Proxy
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
[](https://ci.trj.tw/golang/tcp-proxy)
 | 
			
		||||
 | 
			
		||||
## Build
 | 
			
		||||
 | 
			
		||||
### Bin
 | 
			
		||||
```sh
 | 
			
		||||
$ make
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Docker
 | 
			
		||||
```sh
 | 
			
		||||
$ docker build -t tcp-proxy .
 | 
			
		||||
```
 | 
			
		||||
 
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
### Config
 | 
			
		||||
```yaml
 | 
			
		||||
# verbose level 0=info, 1=verbose, 2=very verbose
 | 
			
		||||
verbose: 0
 | 
			
		||||
listen:
 | 
			
		||||
    # connect target host and port
 | 
			
		||||
  - target_host: 192.168.1.1
 | 
			
		||||
    target_port: 22
 | 
			
		||||
    # local listen port
 | 
			
		||||
    listen_port: 22000
 | 
			
		||||
 | 
			
		||||
    # connect target host ip range and port
 | 
			
		||||
  - target_host: 192.168.1.2-5
 | 
			
		||||
    target_port: 22
 | 
			
		||||
    # local listen port start number (with connect to ip range)
 | 
			
		||||
    listen_port: 22010
 | 
			
		||||
 | 
			
		||||
    # connect target host with domain name and port
 | 
			
		||||
  - target_host: domain.name
 | 
			
		||||
    target_port: 80
 | 
			
		||||
    listen_port: 22100
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Run
 | 
			
		||||
```sh
 | 
			
		||||
$ tcp-proxy -f /path/to/config.yml
 | 
			
		||||
```
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user