WIP: Simple working client/server
This commit is contained in:
		
							
								
								
									
										5
									
								
								stage2/cmd/client/build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								stage2/cmd/client/build.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| go build | ||||
| sudo setcap cap_net_admin+iep ./client | ||||
| ./client 144.76.78.93 | ||||
							
								
								
									
										14
									
								
								stage2/cmd/client/main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								stage2/cmd/client/main.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| package main | ||||
|  | ||||
| import ( | ||||
| 	"log" | ||||
| 	"os" | ||||
| 	"vppn/stage2" | ||||
| ) | ||||
|  | ||||
| func main() { | ||||
| 	if len(os.Args) != 2 { | ||||
| 		log.Fatalf("Usage: %s <addr:port>", os.Args[0]) | ||||
| 	} | ||||
| 	stage2.RunClient(os.Args[1]) | ||||
| } | ||||
							
								
								
									
										6
									
								
								stage2/cmd/server/build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								stage2/cmd/server/build.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| go build | ||||
| scp server kevin:/home/jdl/tmp/ | ||||
| ssh root@kevin "sudo setcap cap_net_admin+iep /home/jdl/tmp/server" | ||||
| ssh kevin "/home/jdl/tmp/server" | ||||
							
								
								
									
										7
									
								
								stage2/cmd/server/main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								stage2/cmd/server/main.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| package main | ||||
|  | ||||
| import "vppn/stage2" | ||||
|  | ||||
| func main() { | ||||
| 	stage2.RunServer() | ||||
| } | ||||
		Reference in New Issue
	
	Block a user