Merge pull request #7 from GreenPenguino/update-examples
Update example scripts
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -13,3 +13,4 @@ Cargo.lock
 | 
			
		||||
# Added by cargo
 | 
			
		||||
 | 
			
		||||
/target
 | 
			
		||||
.vscode/
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								create.sh
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								create.sh
									
									
									
									
									
								
							@@ -1,12 +1,10 @@
 | 
			
		||||
curl --header "Content-Type: application/json" \
 | 
			
		||||
  --data '{"command": {
 | 
			
		||||
                       "Create": {
 | 
			
		||||
                                "incoming_port": 5555,
 | 
			
		||||
                                "destination_port": 8080,
 | 
			
		||||
                                "destination_ip": "127.0.0.1",
 | 
			
		||||
                                "id": "67e55044-10b1-426f-9247-bb680e5fe0c8"
 | 
			
		||||
                              }
 | 
			
		||||
                     },
 | 
			
		||||
           "signature": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
 | 
			
		||||
         }' \
 | 
			
		||||
  --data '{
 | 
			
		||||
            "create": {
 | 
			
		||||
                    "incoming_port": 5555,
 | 
			
		||||
                    "destination_port": 8080,
 | 
			
		||||
                    "destination_ip": "127.0.0.1",
 | 
			
		||||
                    "id": "67e55044-10b1-426f-9247-bb680e5fe0c8"
 | 
			
		||||
            }
 | 
			
		||||
          }' \
 | 
			
		||||
  http://localhost:3000/command
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								delete.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								delete.sh
									
									
									
									
									
								
							@@ -1,9 +1,7 @@
 | 
			
		||||
curl --header "Content-Type: application/json" \
 | 
			
		||||
  --data '{"command": {
 | 
			
		||||
                       "Delete": {
 | 
			
		||||
                                "id": "67e55044-10b1-426f-9247-bb680e5fe0c8"
 | 
			
		||||
                              }
 | 
			
		||||
                     },
 | 
			
		||||
           "signature": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
 | 
			
		||||
         }' \
 | 
			
		||||
  --data '{
 | 
			
		||||
            "delete": {
 | 
			
		||||
                    "id": "67e55044-10b1-426f-9247-bb680e5fe0c8"
 | 
			
		||||
                  }
 | 
			
		||||
          }' \
 | 
			
		||||
  http://localhost:3000/command
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								modify.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								modify.sh
									
									
									
									
									
								
							@@ -1,11 +1,9 @@
 | 
			
		||||
curl --header "Content-Type: application/json" \
 | 
			
		||||
  --data '{"command": {
 | 
			
		||||
                       "Modify": {
 | 
			
		||||
                                "destination_port": 8888,
 | 
			
		||||
                                "destination_ip": "127.0.0.1",
 | 
			
		||||
                                "id": "67e55044-10b1-426f-9247-bb680e5fe0c8"
 | 
			
		||||
                              }
 | 
			
		||||
                     },
 | 
			
		||||
           "signature": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
 | 
			
		||||
         }' \
 | 
			
		||||
  --data '{
 | 
			
		||||
            "modify": {
 | 
			
		||||
                    "destination_port": 8888,
 | 
			
		||||
                    "destination_ip": "127.0.0.1",
 | 
			
		||||
                    "id": "67e55044-10b1-426f-9247-bb680e5fe0c8"
 | 
			
		||||
                  }
 | 
			
		||||
          }' \
 | 
			
		||||
  http://localhost:3000/command
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user